init the viewpager orientation listener earlier

This commit is contained in:
tibbi 2017-10-28 13:46:53 +02:00
parent 4fedc05571
commit 4b4869e845
1 changed files with 1 additions and 1 deletions

View File

@ -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)