how to make hint disappear when edittext is touched?

后端 未结 12 1161
青春惊慌失措
青春惊慌失措 2020-12-14 00:39

In my application in android are many EditText fields. And I ran into a problem with hint. It is not disappearing when EditText is focused, but it disappears when I start to

12条回答
  •  青春惊慌失措
    2020-12-14 01:03

    Try

    EditText editText = (EditText) findViewById(...);
    editText.setHint("");
    

    in your onTouch logic.
    However your hint must be dissapearing when you clicked on edit text. So re-check your app logic.

提交回复
热议问题