Skip to content

Commit f27e4b7

Browse files
fix issue keyboard pop up from float ball
1 parent 89f315d commit f27e4b7

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

termux-x11/src/main/java/com/termux/x11/MainActivity.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -877,18 +877,20 @@ public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, @Non
877877
* @param context calling context
878878
*/
879879
public static void toggleKeyboardVisibility(Context context) {
880-
Log.d("MainActivity", "Toggling keyboard visibility");
881-
if (inputMethodManager != null) {
882-
android.util.Log.d("toggleKeyboardVisibility", "externalKeyboardConnected " + externalKeyboardConnected + " showIMEWhileExternalConnected " + showIMEWhileExternalConnected);
883-
if (isConnected()) {
884-
getInstance().getLorieView().requestFocus();
885-
}
886-
if (!externalKeyboardConnected || showIMEWhileExternalConnected) {
887-
openSoftKeyboard();
888-
} else {
889-
closeSoftKeyboard();
880+
handler.postDelayed(()->{
881+
Log.d("MainActivity", "Toggling keyboard visibility");
882+
if (inputMethodManager != null) {
883+
android.util.Log.d("toggleKeyboardVisibility", "externalKeyboardConnected " + externalKeyboardConnected + " showIMEWhileExternalConnected " + showIMEWhileExternalConnected);
884+
if (isConnected()) {
885+
getInstance().getLorieView().requestFocus();
886+
}
887+
if (!externalKeyboardConnected || showIMEWhileExternalConnected) {
888+
openSoftKeyboard();
889+
} else {
890+
closeSoftKeyboard();
891+
}
890892
}
891-
}
893+
},1000);
892894
}
893895

894896
@SuppressWarnings("SameParameterValue")

0 commit comments

Comments
 (0)