In the onStart method I onStart my keyboard:

 if (allTags.isEmpty()) { Utils.showSystemKeyboard(true, tagNameInputView); } 

But when you exit the application with the home button, the keyboard remains on the display. How to properly destroy all unnecessary elements, in this case, the keyboard. I try this, but on the Chinese phone the keyboard does not remove, unlike nexus'a.

 @Override public void onStop() { super.onStop(); Utils.hideSystemKeyboard(tagNameInputView); } 

Keyboard hide method:

 public static void hideSystemKeyboard(EditText view) { if (view != null) { ((InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE)) .hideSoftInputFromWindow(view.getWindowToken(), 0); } } 
  • one
    Try Utils.showSystemKeyboard first (false, tagNameInputView); and then just super.onStop (); -> change the lines in some places - Andrew Grow
  • @AndrewGrow tried and so, unfortunately, this option does not fit. - Morozov
  • Most likely the point is in the implementation of the show hide method. In general, everything is correct - YuriySPb
  • @Yuriy SPb like as with the method of problems should not be. Added method. - Morozov
  • Maybe in the manifesto something else to change? Or programmatically try changing softInputMode - YuriySPb

1 answer 1

When implementing the showSystemKeyboard method, showSystemKeyboard used a constant: SHOW_FORCED , as it turned out, the problem that I found here was covered in it.

Also, if you doubt which constant to use, you can emphasize a lot of useful things here: official documentation .

I also think the following answer would be helpful.