Android_Learner
Android_Learner
mCommonTabLayout.setTabData(data); mFragmentChangeManager = new FragmentChangeManager(this.getSupportFragmentManager(),R.id.home_fra_content, fsRes); //设置数据 // mCommonTabLayout.setTabData((ArrayList) data, this, R.id.home_fra_content, fsRes); mCommonTabLayout.setOnTabSelectListener(new OnTabSelectListener() { @Override public void onTabSelect(int position) { if (position == 4&& MyApplication.pref.getInt(MyApplication.prefKey10_login_userType,-1)==3){ MyApplication.remindVisitor(HomeAct.this); }else {...
当作为底部的tab菜单时,有时候点击tab会有一个判断,当判断不通过会执行其他的操作,而不跳转到tab。建议给Tab增加一个拦截点击事件的方法,boolean onTabSelectIntercept(int position)。 true代表拦截,则不执行点击方法不跳转;false代表不拦截,则执行点击方法并跳转。