get real display size at viewpager, including status bar height
This commit is contained in:
parent
8d3125ca17
commit
4174769235
1 changed files with 1 additions and 1 deletions
|
@ -402,7 +402,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun measureScreen() {
|
private fun measureScreen() {
|
||||||
val metrics = DisplayMetrics()
|
val metrics = DisplayMetrics()
|
||||||
windowManager.defaultDisplay.getMetrics(metrics)
|
windowManager.defaultDisplay.getRealMetrics(metrics)
|
||||||
screenWidth = metrics.widthPixels
|
screenWidth = metrics.widthPixels
|
||||||
screenHeight = metrics.heightPixels
|
screenHeight = metrics.heightPixels
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue