mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-16 19:13:40 +01:00
Merge pull request #22772 from hrydgard/android-inputbox-no-fullscreen
Android: Keep the keyboard from covering the text input dialog
This commit is contained in:
1 file changed
+4
-2
@@ -1630,7 +1630,8 @@ public class PpssppActivity extends AppCompatActivity implements SensorEventList
|
||||
} else {
|
||||
input.setInputType(InputType.TYPE_CLASS_TEXT);
|
||||
}
|
||||
input.setImeOptions(EditorInfo.IME_ACTION_DONE);
|
||||
// In landscape, keyboards otherwise go fullscreen with an edit box of their own, covering the dialog.
|
||||
input.setImeOptions(EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_EXTRACT_UI | EditorInfo.IME_FLAG_NO_FULLSCREEN);
|
||||
input.setText(defaultText);
|
||||
input.setFocusableInTouchMode(true);
|
||||
input.requestFocus();
|
||||
@@ -1680,7 +1681,8 @@ public class PpssppActivity extends AppCompatActivity implements SensorEventList
|
||||
dlg.setCancelable(true);
|
||||
Window wnd = dlg.getWindow();
|
||||
if (wnd != null) {
|
||||
wnd.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
// Moves the dialog up out of the keyboard's way.
|
||||
wnd.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
}
|
||||
try {
|
||||
dlg.show();
|
||||
|
||||
Reference in new issue
Block a user