I have an activity that displays a few EditTexts on screen for user input. To be sure the soft keyboard doesn\'t cover my fields when it displays I have set the property
If this is as you described, I think this may be a genuine bug, so may be worth writing it up on the Android Source site.
So evidently I can only think of hack work arounds!
Override when the keyboard disappears:
public boolean onKeyPreIme(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK &&
event.getAction() == KeyEvent.ACTION_UP) {
revalidateEditText();
return false;
}
return super.dispatchKeyEvent(event);
}
public void revalidateEditText(){
// Dismiss your origial error dialog
setError(null);
// figure out which EditText it is, you already have this code
// call your validator like in the Q
validate(editText); // or whatever your equivalent is
}
This will revalidate your EditText, dismiss your error dialog and re-show it.
How's that sound?
Inspired by: Get back key event on EditText