AriesHoo / FastLib

一个Android项目级快速开发框架,节约大部分写常用功能时间以实现更多项目业务功能及体验上的优化。使用说明见wiki

Home Page:https://github.com/AriesHoo/FastLib/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问下,怎么跳转到指定的主页面里

D-zy opened this issue · comments

commented

博主,比如我在某个页面里,点击想跳转到主页中“我的”tab下,怎么设置啊

commented

使用 mTabLayout.setCurrentTab(2); 时,底部tab“我的”是选中了,但是viewPage 却显示的是“首页”的

@OverRide
public void setTabLayout(CommonTabLayout tabLayout) {
mTabLayout = tabLayout;
}

然后 切换Fragment
public void switchTabIndex(int index) {
if (mTabLayout == null || mTabLayout.getCurrentTab() == index) {
return;
}
mTabLayout.setCurrentTab(index);
}

FastLib使用的是哪个版本,用最新的。

commented

是用的比较新的版本,但这样设置了,还是无效

用最新的,你说的那个问题我是知道的,是tabLayout里面Fragment的加载方式问题,我改过

commented

好的,更新了已解决,谢谢