File tree 1 file changed +4
-8
lines changed
recipes/android/src/android
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -179,18 +179,14 @@ version_codes = autoclass('android.os.Build$VERSION_CODES')
179
179
180
180
181
181
python_act = autoclass(' org.renpy.android.PythonActivity' )
182
- Rect = autoclass(' android.graphics.Rect' )
183
182
mActivity = python_act.mActivity
184
183
if mActivity:
185
- # do not add a listener here, one is already implemented in the Hardware.java
186
- # that sends a event to kivy which makes a call to `get_keyboard_height`.
187
- decorview = mActivity.getWindow().getDecorView()
188
- default_display = mActivity.getWindowManager().getDefaultDisplay()
184
+ # do not add a listener here, one is already implemented in
185
+ # SDLSurfaceView.java which sends a event to kivy which makes
186
+ # a call to `get_keyboard_height`.
189
187
190
188
def get_keyboard_height ():
191
- rctx = Rect()
192
- decorview.getWindowVisibleDisplayFrame(rctx)
193
- return default_display.getHeight() - (rctx.bottom - rctx.top)
189
+ return python_act.mView.kHeight
194
190
else :
195
191
def get_keyboard_height ():
196
192
return 0
You can’t perform that action at this time.
0 commit comments