有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

Android或Xamarin中Edittext的java设置提示

我在代码隐藏处尝试了EditText的动态提示。虽然有错误,但令人费解。 您可以稍后查看代码

EditText editTextAddres=FindViewById

或在Java中

编辑文本

editTextAddres=FindViewById<EditText(Resource.Id.entereventeditTextAddres);
editTextAddres.hint="EnterCity";//Error

共 (2) 个答案

  1. # 1 楼答案

    试试EditText.Hint = "Your text"

  2. # 2 楼答案

    EditText edtText;
    edtText = findViewById(R.id.edtText);
    edtText.setHint("Here goes your Hint");