Skip to content

Commit 8677ded

Browse files
author
Oskari Leppäaho
committed
Don't show the input box on top of the keyboard
1 parent 23e0bce commit 8677ded

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

-21 Bytes
Binary file not shown.

src/androidProj/nativeeditplugin/src/main/java/com/bkmin/android/EditBox.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import android.view.KeyEvent;
2424
import android.view.MotionEvent;
2525
import android.view.View;
26+
import android.view.inputmethod.EditorInfo;
2627
import android.view.inputmethod.InputMethodManager;
2728
import android.widget.EditText;
2829
import android.widget.RelativeLayout;
@@ -109,7 +110,7 @@ public void showKeyboard(boolean isShow)
109110
InputMethodManager imm = (InputMethodManager) NativeEditPlugin.unityActivity.getSystemService(Activity.INPUT_METHOD_SERVICE);
110111
if (isShow)
111112
{
112-
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
113+
imm.showSoftInput(edit, InputMethodManager.SHOW_FORCED);
113114
}
114115
else
115116
{
@@ -354,6 +355,8 @@ public void onTextChanged(CharSequence s, int start,
354355
}
355356
});
356357

358+
edit.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
359+
357360
layout.setFocusableInTouchMode(true);
358361
layout.setClickable(true);
359362
layout.addView(edit);

0 commit comments

Comments
 (0)