File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
pythonforandroid/recipes/android/src/android Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -190,8 +190,14 @@ if mActivity:
190
190
@ java_method (' ()V' )
191
191
def onGlobalLayout (self ):
192
192
rctx = Rect()
193
+ # print('rctx_bottom: {0}, top: {1}'.format(rctx.bottom, rctx.top))
193
194
mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rctx)
195
+ # print('rctx_bottom: {0}, top: {1}'.format(rctx.bottom, rctx.top))
196
+ # print('activity height: {0}'.format(mActivity.getWindowManager().getDefaultDisplay().getHeight()))
197
+ # NOTE top should always be zero
198
+ rctx.top = 0
194
199
self .height = mActivity.getWindowManager().getDefaultDisplay().getHeight() - (rctx.bottom - rctx.top)
200
+ # print('final height: {0}'.format(self.height))
195
201
196
202
ll = LayoutListener()
197
203
python_act.mView.getViewTreeObserver().addOnGlobalLayoutListener(ll)
You can’t perform that action at this time.
0 commit comments