|
|
@ -5,7 +5,7 @@ import android.view.KeyEvent |
|
|
|
import android.view.MenuItem |
|
|
|
import android.view.MenuItem |
|
|
|
import androidx.fragment.app.Fragment |
|
|
|
import androidx.fragment.app.Fragment |
|
|
|
import androidx.fragment.app.FragmentManager |
|
|
|
import androidx.fragment.app.FragmentManager |
|
|
|
import androidx.fragment.app.FragmentPagerAdapter |
|
|
|
import androidx.fragment.app.FragmentStatePagerAdapter |
|
|
|
import androidx.viewpager.widget.ViewPager |
|
|
|
import androidx.viewpager.widget.ViewPager |
|
|
|
import com.google.android.material.bottomnavigation.BottomNavigationView |
|
|
|
import com.google.android.material.bottomnavigation.BottomNavigationView |
|
|
|
import io.legado.app.App |
|
|
|
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) : |
|
|
|
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 { |
|
|
|
override fun getItem(position: Int): Fragment { |
|
|
|
return when (position) { |
|
|
|
return when (position) { |
|
|
|