From 41747692356345f4da188dd32ee53e22d02aad66 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 24 May 2017 22:27:34 +0200 Subject: [PATCH] get real display size at viewpager, including status bar height --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 5d100a63e..ed2fb22a1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -402,7 +402,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun measureScreen() { val metrics = DisplayMetrics() - windowManager.defaultDisplay.getMetrics(metrics) + windowManager.defaultDisplay.getRealMetrics(metrics) screenWidth = metrics.widthPixels screenHeight = metrics.heightPixels }