问题描述
我有一个包含三个选项卡的 tabLayout 我希望所选的选项卡在选择后移动到索引零,就像演示here
private val fragList by lazy {
arraylistof<Fragment>(
MainFragment.newInstance("Hello","Fragment $0"),MainFragment.newInstance("Hello","Fragment $1"),"Fragment $2")
)
}
private val bottomSheetViewPagerAdapter by lazy {
ViewPagerAdapter(this,3) {
fragList[it]
}
}
private val viewPagerScrollListener by lazy {
object :ViewPager2.OnPageChangeCallback(){
override fun onPageSelected(position: Int) {
super.onPageSelected(position)
Log.i("ViewPagerScroll","$position")
}
}
}
关于如何实现这一目标的任何建议
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)