mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 15:47:26 +00:00
Android: clear the native focus when the keyboard hides
Otherwise the keyboard will popup again when the app is switched to the background and back. Fixes #5235
This commit is contained in:
parent
a1e7f85892
commit
b3181b05a2
1 changed files with 1 additions and 0 deletions
|
@ -409,6 +409,7 @@ public class SlintAndroidJavaHelper {
|
||||||
public void run() {
|
public void run() {
|
||||||
InputMethodManager imm = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.hideSoftInputFromWindow(mInputView.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(mInputView.getWindowToken(), 0);
|
||||||
|
mInputView.clearFocus();
|
||||||
mInputView.setCursorPos(0, 0, 0, 0, 0, 0);
|
mInputView.setCursorPos(0, 0, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue