TextInputLayout and EditText double hint issue

后端 未结 7 2298
生来不讨喜
生来不讨喜 2021-02-11 19:34

I want to set the hint with java in EditText(which is in TextInputLayout).

Code used for setting hint:

aET = (EditText) findViewById(R.id.

7条回答
  •  眼角桃花
    2021-02-11 20:01

    I also had this issue.

    when I needed to update the hint, I (erroneously) did that on both the EditText and the TextInputLayout, which resulted in a blur.

    solution was to not call EditText.setHint() but only TextInputLayout.setHint()

提交回复
热议问题