So i had a listener that i thought i got rid of but it was still in
the code:
emailEntry.setOnKeyListener(new View.OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
emailEntry.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
return false;
}
});
Now the setError behavior works fine. Issue Resolved.
On Dec 9, 2:07 am, Etienne <[email protected]> wrote:
> The documentation for the method TextView.setError() says that the
> method:
>
> "Sets the right-hand compound drawable of the TextView to the "error"
> icon and sets an error message that will be displayed in a popup when
> the TextView has focus. The icon and error message will be reset to
> null when any key events cause changes to the TextView's text. If the
> error is null, the error message and icon will be cleared."
>
> So there are many EditText views that i use this method without any
> problems. However, there is one EditText view in which once i use the
> arrows from my keyboard to gain focus on the view, the error icon gets
> set to null and disappears but the error message is still displayed.
> The desired behavior should be that both the icon and message show
> until a key is pressed to enter text into the view.
>
> The disappearing icon does not happen if i use my mouse to click on
> the EditText view so that it gains focus.
> Has anybody seen this issue or know what could be the cause of this?
> Thanks for any help with this.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en