Merge pull request #26353 from ivanarh/android_hide_keyboard_crash
Android: Fixed a possible crash in keyboard hide method.
This commit is contained in:
commit
351a2fa41c
1 changed files with 0 additions and 8 deletions
|
@ -516,14 +516,6 @@ public class GodotIO {
|
|||
public void hideKeyboard() {
|
||||
if (edit != null)
|
||||
edit.hideKeyboard();
|
||||
|
||||
InputMethodManager inputMgr = (InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
View v = activity.getCurrentFocus();
|
||||
if (v != null) {
|
||||
inputMgr.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
} else {
|
||||
inputMgr.hideSoftInputFromWindow(new View(activity).getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
}
|
||||
};
|
||||
|
||||
public void setScreenOrientation(int p_orientation) {
|
||||
|
|
Loading…
Reference in a new issue