File tree 1 file changed +11
-3
lines changed
src/src/org/renpy/android
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 63
63
import java .nio .ByteBuffer ;
64
64
import java .nio .ByteOrder ;
65
65
import android .graphics .Color ;
66
+ import android .graphics .Rect ;
66
67
import android .content .res .Resources ;
67
68
68
69
@@ -1171,11 +1172,18 @@ public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
1171
1172
// add a listener for the layout chnages to the IME view
1172
1173
final android .view .View activityRootView = mActivity .getWindow ().getDecorView ();
1173
1174
activityRootView .getViewTreeObserver ().addOnGlobalLayoutListener (new android .view .ViewTreeObserver .OnGlobalLayoutListener () {
1175
+ final android .view .Display default_display = mActivity .getWindowManager ().getDefaultDisplay ();
1176
+
1174
1177
@ Override
1175
1178
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
+ }
1179
1187
}
1180
1188
});
1181
1189
return new BaseInputConnection (this , false ){
You can’t perform that action at this time.
0 commit comments