|
@@ -124,15 +124,27 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBindin
|
|
|
}
|
|
|
|
|
|
private void initListener(){
|
|
|
- tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
|
|
+ viewBinding.tablayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
|
|
@Override
|
|
|
public void onTabSelected(TabLayout.Tab tab) {
|
|
|
- viewPager.setCurrentItem(tab.getPosition());
|
|
|
+ if (tab != null && tab.getCustomView() != null) {
|
|
|
+ View customView = tab.getCustomView();
|
|
|
+ TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
|
|
|
+ tv_text.setTextSize(16);
|
|
|
+ tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_131415));
|
|
|
+ tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onTabUnselected(TabLayout.Tab tab) {
|
|
|
-
|
|
|
+ if (tab != null && tab.getCustomView() != null) {
|
|
|
+ View customView = tab.getCustomView();
|
|
|
+ TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
|
|
|
+ tv_text.setTextSize(16);
|
|
|
+ tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_80000000));
|
|
|
+ tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|