mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
prepare 2 images on both sides at the fullscreen view
This commit is contained in:
parent
2503aead44
commit
11a98d69fe
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue