Screen Size Honeycomb Menu android

前端 未结 3 1727
囚心锁ツ
囚心锁ツ 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:58

    Why not use the height of the activity's top-level View? e.g. if your activity contains a full-height LinearLayout, use its height, so you don't have to know the menu height, or noticiation bar height.

    I think you're treading a dangerous road doing this kind of calculation, as you don't know what the future layouts for Android might be, or how they might differ on Google TV, or whatever.

提交回复
热议问题