From 4b4869e8459ad6ce3170c73c404f97e46f45dd5e Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 28 Oct 2017 13:46:53 +0200 Subject: [PATCH] init the viewpager orientation listener earlier --- .../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 18eb2f5df..a6d91c38b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -85,6 +85,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun initViewPager() { + setupOrientationEventListener() measureScreen() val uri = intent.data if (uri != null) { @@ -140,7 +141,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View reloadViewPager() scanPath(mPath) {} - setupOrientationEventListener() if (config.darkBackground) view_pager.background = ColorDrawable(Color.BLACK)