File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
src/src/org/renpy/android Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 6363import java .nio .ByteBuffer ;
6464import java .nio .ByteOrder ;
6565import android .graphics .Color ;
66+ import android .graphics .Rect ;
6667import android .content .res .Resources ;
6768
6869
@@ -1171,11 +1172,18 @@ public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
11711172 // add a listener for the layout chnages to the IME view
11721173 final android .view .View activityRootView = mActivity .getWindow ().getDecorView ();
11731174 activityRootView .getViewTreeObserver ().addOnGlobalLayoutListener (new android .view .ViewTreeObserver .OnGlobalLayoutListener () {
1175+ final android .view .Display default_display = mActivity .getWindowManager ().getDefaultDisplay ();
1176+
11741177 @ Override
11751178 public void onGlobalLayout () {
1176- //send control sequence start /x04 == kayboard layout changed
1177- nativeKey (45 , 1 , 4 );
1178- nativeKey (45 , 0 , 4 );
1179+ Rect rctx = new Rect ();
1180+ activityRootView .getWindowVisibleDisplayFrame (rctx );
1181+ int heightDiff = default_display .getHeight () - (rctx .bottom - rctx .top );
1182+ if (heightDiff > 100 ){
1183+ //send control sequence start /x04 == kayboard layout changed
1184+ nativeKey (45 , 1 , 4 );
1185+ nativeKey (45 , 0 , 4 );
1186+ }
11791187 }
11801188 });
11811189 return new BaseInputConnection (this , false ){
You can’t perform that action at this time.
0 commit comments