From 11a98d69feb3ef31287e96e33c4f120dab03dd0c Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 26 Apr 2017 23:03:37 +0200 Subject: [PATCH] prepare 2 images on both sides at the fullscreen view --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 1 + 1 file changed, 1 insertion(+) 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 f1e30b263..0f2825ae3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -209,6 +209,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, mMedia) if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) { view_pager.apply { + offscreenPageLimit = 2 adapter = pagerAdapter currentItem = mPos addOnPageChangeListener(this@ViewPagerActivity)