Skip to content Skip to sidebar Skip to footer

Edittext Keyboard Is Dissappearing

I have an EditText and a Button in LinearLayout. When clicked to button, I am removing all views in layout and adding another view. When back button is pressed I am removing all vi

Solution 1:

Try this code, it will work for you.

InputMethodManagerm= (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
  if(m != null){
      m.toggleSoftInput(0, InputMethodManager.SHOW_IMPLICIT);
   }

Solution 2:

show keyboard using

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);

Post a Comment for "Edittext Keyboard Is Dissappearing"