mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-14 13:01:17 +01:00
Do not force soft keyboard visible when hw exists
This commit is contained in:
parent
6caaae4fd6
commit
19eb371d23
1 changed files with 5 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package com.termux.app;
|
|||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.Configuration;
|
||||
import android.text.Selection;
|
||||
import android.util.TypedValue;
|
||||
import android.view.KeyEvent;
|
||||
|
|
@ -69,7 +70,10 @@ final class DialogUtils {
|
|||
}
|
||||
|
||||
dialogHolder[0] = builder.create();
|
||||
if ((activity.getResources().getConfiguration().hardKeyboardHidden & Configuration.HARDKEYBOARDHIDDEN_YES) == 0) {
|
||||
// Show soft keyboard unless hardware keyboard available.
|
||||
dialogHolder[0].getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
}
|
||||
dialogHolder[0].show();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue