Enable LATHA_GUI_TEXT_INPUT so soft keyboard opens on Search apps
This commit is contained in:
1 parent
fda509190a
commit
c89c6a7e53
2 files changed
+6
-1
No files matched your search
@@ -131,7 +131,8 @@ public class LauncherActivity extends NativeActivity {
|
|||||||
searchInput.setSingleLine(true);
|
searchInput.setSingleLine(true);
|
||||||
searchInput.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
searchInput.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||||
searchInput.setImeOptions(EditorInfo.IME_ACTION_GO);
|
searchInput.setImeOptions(EditorInfo.IME_ACTION_GO);
|
||||||
searchInput.setFocusableInTouchMode(true);
|
searchInput.setFocusable(false);
|
||||||
|
searchInput.setFocusableInTouchMode(false);
|
||||||
searchInput.addTextChangedListener(new TextWatcher() {
|
searchInput.addTextChangedListener(new TextWatcher() {
|
||||||
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||||
@Override public void onTextChanged(CharSequence s, int start, int before, int count) { }
|
@Override public void onTextChanged(CharSequence s, int start, int before, int count) { }
|
||||||
@@ -407,6 +408,7 @@ public class LauncherActivity extends NativeActivity {
|
|||||||
InputMethodManager imm = getSystemService(InputMethodManager.class);
|
InputMethodManager imm = getSystemService(InputMethodManager.class);
|
||||||
if (imm == null || searchInput == null) return;
|
if (imm == null || searchInput == null) return;
|
||||||
if (active) {
|
if (active) {
|
||||||
|
searchInput.setFocusable(true);
|
||||||
searchInput.setFocusableInTouchMode(true);
|
searchInput.setFocusableInTouchMode(true);
|
||||||
searchInput.requestFocus();
|
searchInput.requestFocus();
|
||||||
imm.showSoftInput(searchInput, InputMethodManager.SHOW_IMPLICIT);
|
imm.showSoftInput(searchInput, InputMethodManager.SHOW_IMPLICIT);
|
||||||
@@ -416,6 +418,8 @@ public class LauncherActivity extends NativeActivity {
|
|||||||
searchInput.setText("");
|
searchInput.setText("");
|
||||||
suppressSearchWatch = false;
|
suppressSearchWatch = false;
|
||||||
searchInput.clearFocus();
|
searchInput.clearFocus();
|
||||||
|
searchInput.setFocusableInTouchMode(false);
|
||||||
|
searchInput.setFocusable(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -510,6 +510,7 @@ fn android_main(app: AndroidApp) {
|
|||||||
let mut wasi_builder = WasiCtxBuilder::new();
|
let mut wasi_builder = WasiCtxBuilder::new();
|
||||||
wasi_builder.inherit_stdio();
|
wasi_builder.inherit_stdio();
|
||||||
wasi_builder.env("QT_QPA_PLATFORM", "qt2wasmgui");
|
wasi_builder.env("QT_QPA_PLATFORM", "qt2wasmgui");
|
||||||
|
wasi_builder.env("LATHA_GUI_TEXT_INPUT", "1");
|
||||||
let _ = wasi_builder.preopened_dir(&data_dir, "/data", FsPerms::ReadWrite);
|
let _ = wasi_builder.preopened_dir(&data_dir, "/data", FsPerms::ReadWrite);
|
||||||
|
|
||||||
let state = HostState {
|
let state = HostState {
|
||||||
|
|||||||
Reference in new issue
Block a user