Reputation: 17
I'm having a little trouble with Xamarin's implementation of Android EditText.setError.
Most of the answers around here say that to dismiss an error message you just call setError(null), but Xamarin won't compile with it, claiming that no overload accepts only 1 argument. Unfortunately, giving it setError(null, null) is also not working because there are two overloads that use two arguments and it doesn't know which one to use (and will not compile).
Any ideas?
Upvotes: 1
Views: 737
Reputation: 12200
Cast the first null
argument in SetError
to either string
or Java.Lang.ICharSequence
:
EditText editText;
editText.SetError((string)null, null);
editText.SetError((Java.Lang.ICharSequence)null, null);
Upvotes: 2