Exception When Try To Seterror() In An Edittext Inside A Popup Window
This is my code: if(textNomeGiocatore.getText().toString().equals('')){ InputMethodManager imm = (InputMethodManager)getSystemService( Con
Solution 1:
0Please try this:
if(textNomeGiocatore.getText().toString().equals("")) {
InputMethodManager inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (inputManager != null && getCurrentFocus() != null) {
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
}
textNomeGiocatore.requestFocus()
textNomeGiocatore.setError("Nome giocatore necessario");
}
Post a Comment for "Exception When Try To Seterror() In An Edittext Inside A Popup Window"