请问下,怎么跳转到指定的主页面里
D-zy opened this issue · comments
D-zy commented
博主,比如我在某个页面里,点击想跳转到主页中“我的”tab下,怎么设置啊
D-zy commented
使用 mTabLayout.setCurrentTab(2); 时,底部tab“我的”是选中了,但是viewPage 却显示的是“首页”的
Aries Hoo²⁰²¹ commented
@OverRide
public void setTabLayout(CommonTabLayout tabLayout) {
mTabLayout = tabLayout;
}
然后 切换Fragment
public void switchTabIndex(int index) {
if (mTabLayout == null || mTabLayout.getCurrentTab() == index) {
return;
}
mTabLayout.setCurrentTab(index);
}
Aries Hoo²⁰²¹ commented
FastLib使用的是哪个版本,用最新的。
D-zy commented
是用的比较新的版本,但这样设置了,还是无效
Aries Hoo²⁰²¹ commented
用最新的,你说的那个问题我是知道的,是tabLayout里面Fragment的加载方式问题,我改过
D-zy commented
好的,更新了已解决,谢谢