Open KevCel opened 7 years ago
It happens to me too.. I am using a device with android 5.0
It's my temporary solution.
`@Override protected void onPause() { super.onPause();
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}`
I've tried to find a way to hide the keyboard from the view automatically, but I haven't found a way to ensure that Util.closeSoftKeyboard
is called before the activity has paused. So calling Util.closeSoftKeyboard
after the activity has paused does not hide the keyboard.
I think the best solution is @KevCel to be sure that the keyboard is hidden before pausing an activity.
Maybe a better approach could be to use the library close function to be sure we hide the keyboard the same way as the library does:
@Override
protected void onPause() {
// Hide keyboard always on pause
Util.closeSoftKeyboard(this);
super.onPause();
}
When I hide app/debug app/someone call to me a keyboard is still visible.
Android 6.0, LG K8