From 87d3cf6501b1ac4e6e942da68cb17213c0753e68 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 11 Oct 2021 22:08:23 +0200 Subject: [PATCH] avoid recreating the content of tabs at swiping --- .../simplemobiletools/filemanager/pro/activities/MainActivity.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt index c8fa1001..934438ce 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt @@ -331,6 +331,7 @@ class MainActivity : SimpleActivity() { private fun initFragments() { main_view_pager.adapter = ViewPagerAdapter(this) + main_view_pager.offscreenPageLimit = 2 main_view_pager.currentItem = config.lastUsedViewPagerPage main_view_pager.onPageChangeListener { main_tabs_holder.getTabAt(it)?.select()