From f3e364e80f309b20f16f8a1c19399a17f26c0e57 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 1 Dec 2019 19:34:41 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/main/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index fccddec44..3a62c0999 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -5,7 +5,7 @@ import android.view.KeyEvent import android.view.MenuItem import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager -import androidx.fragment.app.FragmentPagerAdapter +import androidx.fragment.app.FragmentStatePagerAdapter import androidx.viewpager.widget.ViewPager import com.google.android.material.bottomnavigation.BottomNavigationView import io.legado.app.App @@ -132,7 +132,7 @@ class MainActivity : VMBaseActivity(R.layout.activity_main), } private inner class TabFragmentPageAdapter internal constructor(fm: FragmentManager) : - FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { + FragmentStatePagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { override fun getItem(position: Int): Fragment { return when (position) {