Android AppCompatEditText,AppCompatTextView, setText without ID

前端 未结 2 1800
梦谈多话
梦谈多话 2021-01-17 00:46

I have simple Login page with some textview and edittex and i set static text to textview and hint to edittext from string.xml working fine.

But Now

i am recei

相关标签:
2条回答
  • 2021-01-17 00:55

    Just include android:id="@+id/textView1 in your XML to set ID of an element.

    0 讨论(0)
  • 2021-01-17 00:59

    You can use findViewByName rather than findViewById and then continue with your code.

    0 讨论(0)
提交回复
热议问题