Screen Size Honeycomb Menu android

前端 未结 3 1794
囚心锁ツ
囚心锁ツ 2021-01-20 03:06

Hi I am trying yo get the screen size of screen minus the menu bar at the bottom.

I know I could just subtract a constant number according to the resolution of the d

3条回答
  •  情深已故
    2021-01-20 03:53

    Try calling getHeight() after onLayout. The view is not sized on inflate.

    EDIT: Or since Activity does not have onLayout you might wait for onSizeChanged.

    (Reference How to know when activity is laid out?)

提交回复
热议问题