mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
prepare 2 images on both sides at the fullscreen view
This commit is contained in:
@ -209,6 +209,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, mMedia)
|
val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, mMedia)
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) {
|
||||||
view_pager.apply {
|
view_pager.apply {
|
||||||
|
offscreenPageLimit = 2
|
||||||
adapter = pagerAdapter
|
adapter = pagerAdapter
|
||||||
currentItem = mPos
|
currentItem = mPos
|
||||||
addOnPageChangeListener(this@ViewPagerActivity)
|
addOnPageChangeListener(this@ViewPagerActivity)
|
||||||
|
Reference in New Issue
Block a user