Enable LATHA_GUI_TEXT_INPUT so soft keyboard opens on Search apps

This commit is contained in:
nandi committed 2026-11-13 12:43:44 -08:00
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.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
searchInput.setImeOptions(EditorInfo.IME_ACTION_GO);
searchInput.setFocusableInTouchMode(true);
searchInput.setFocusable(false);
searchInput.setFocusableInTouchMode(false);
searchInput.addTextChangedListener(new TextWatcher() {
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
@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);
if (imm == null || searchInput == null) return;
if (active) {
searchInput.setFocusable(true);
searchInput.setFocusableInTouchMode(true);
searchInput.requestFocus();
imm.showSoftInput(searchInput, InputMethodManager.SHOW_IMPLICIT);
@@ -416,6 +418,8 @@ public class LauncherActivity extends NativeActivity {
searchInput.setText("");
suppressSearchWatch = false;
searchInput.clearFocus();
searchInput.setFocusableInTouchMode(false);
searchInput.setFocusable(false);
}
});
}
+1
View File
@@ -510,6 +510,7 @@ fn android_main(app: AndroidApp) {
let mut wasi_builder = WasiCtxBuilder::new();
wasi_builder.inherit_stdio();
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 state = HostState {