EditText setError() with icon but without Popup me

2019-01-05 01:24发布

I want to to have some validation for my EditText wherein I want to show "enter image description here" icon (that comes when you put editText.setError("blah blah")) but don't want the text in the popup displaying that "blah blah".

Is there any way to do it? One way is to create a custom layout which will show the image icon in the EditText. But is there any better solution?

7条回答
Juvenile、少年°
2楼-- · 2019-01-05 01:51

Simply do the following >>

editText.requestFocus();
editText.setError( "your error message" );

worked for me.

查看更多
登录 后发表回答