pull/32/head
kunfei 5 years ago
parent 9483e0346c
commit 65ad0e1f49
  1. 12
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt

@ -29,7 +29,7 @@ import kotlinx.coroutines.withContext
class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main),
BottomNavigationView.OnNavigationItemSelectedListener,
ViewPager.OnPageChangeListener {
ViewPager.OnPageChangeListener by ViewPager.SimpleOnPageChangeListener() {
override val viewModel: MainViewModel
get() = getViewModel(MainViewModel::class.java)
@ -73,16 +73,6 @@ class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main),
}
}
override fun onPageScrollStateChanged(state: Int) {
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
override fun onPageSelected(position: Int) {
bottom_navigation_view.menu.getItem(position).isChecked = true
}

Loading…
Cancel
Save