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:
190190 @ java_method (' ()V' )
191191 def onGlobalLayout (self ):
192192 rctx = Rect()
193+ # print('rctx_bottom: {0}, top: {1}'.format(rctx.bottom, rctx.top))
193194 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
194199 self .height = mActivity.getWindowManager().getDefaultDisplay().getHeight() - (rctx.bottom - rctx.top)
200+ # print('final height: {0}'.format(self.height))
195201
196202 ll = LayoutListener()
197203 python_act.mView.getViewTreeObserver().addOnGlobalLayoutListener(ll)
You can’t perform that action at this time.
0 commit comments