Skip to content

Commit d891e14

Browse files
committed
Merge pull request kivy#383 from kivy/keyboard_height_pan_fix
Make sure `keyboard_height` is triggered while being dismissed.
2 parents fb6b430 + 69ae489 commit d891e14

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/src/org/renpy/android/SDLSurfaceView.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ public interface OnInterceptTouchListener {
293293

294294
// what is the textinput type while calling the keyboard
295295
public int inputType = EditorInfo.TYPE_CLASS_TEXT;
296+
297+
//
298+
public int kHeight = 0;
296299

297300
// Is Python ready to receive input events?
298301
static boolean mInputActivated = false;
@@ -1179,11 +1182,13 @@ public void onGlobalLayout() {
11791182
Rect rctx = new Rect();
11801183
activityRootView.getWindowVisibleDisplayFrame(rctx);
11811184
int heightDiff = default_display.getHeight() - (rctx.bottom - rctx.top);
1182-
if (heightDiff > 100){
1185+
if (heightDiff != kHeight){
1186+
Log.i("Python:", String.format("Layout Triggered, Keyboard_height: %s", heightDiff));
11831187
//send control sequence start /x04 == kayboard layout changed
11841188
nativeKey(45, 1, 4);
11851189
nativeKey(45, 0, 4);
11861190
}
1191+
kHeight = heightDiff;
11871192
}
11881193
});
11891194
return new BaseInputConnection(this, false){

0 commit comments

Comments
 (0)