pull/51/head
kunfei 5 years ago
parent 7bcae09d71
commit f3e364e80f
  1. 4
      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<MainViewModel>(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) {

Loading…
Cancel
Save