Android EditText Hint

后端 未结 4 1935
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 06:40

I have set a hint for an EditText, currently the hint visibility is gone. When a user starts typing, I want to remove the hint text, when the cursor is visible

4条回答
  •  醉话见心
    2020-11-30 07:00

    To complete Sunit's answer, you can use a selector, not to the text string but to the textColorHint. You must add this attribute on your editText:

    android:textColorHint="@color/text_hint_selector"
    

    And your text_hint_selector should be:

    
        
        
    
    

提交回复
热议问题