When nothing has focus can't close keyboard. (Likely it's not up in that
case anyway.)
This commit is contained in:
Eric House 2021-02-24 21:18:59 -08:00
parent 1c9b94efbc
commit ad8451d5c9

View file

@ -824,10 +824,12 @@ public class DictBrowseDelegate extends DelegateBase
private void hideSoftKeyboard()
{
View hasFocus = m_activity.getCurrentFocus();
if ( null != hasFocus ) {
InputMethodManager imm = (InputMethodManager)
m_activity.getSystemService( Activity.INPUT_METHOD_SERVICE );
imm.hideSoftInputFromWindow( m_activity.getCurrentFocus()
.getWindowToken(), 0);
imm.hideSoftInputFromWindow( hasFocus.getWindowToken(), 0 );
}
}
private static void launch( Delegator delegator, Bundle bundle )