From 4c4bbb032084bdf40639e0b5bd7e639e9970f81b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 8 Apr 2017 18:21:44 +0200 Subject: [PATCH] properly show the media for Android 4.1 --- .../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 77742d17e..2f77de8bd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -204,7 +204,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun updatePagerItems() { 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 { adapter = pagerAdapter currentItem = mPos