Tablayout+viewpager使用 https://blog.csdn.net/LIXIAONA_1101/article/details/81226079
上面博客中又说到一种设置tabitem标题的,下面是第二种:
//此方法用来显示tab上的名字
@Override
public CharSequence getPageTitle(int position) {
return tablist.get(position);
}
我遇到的问题:
我的tab有27个 全部都在一行显示 这么显示下来我的tablayout为全白
解决方法:
设置tablayout模式:app:tabMode="scrollable"
TabLayout在清单文件的属性设置:
android.support.design:tabIndicatorColor — 设置tab指示器(tab的下划线)的颜色。
android.support.design:tabIndicatorHeight — 设置tab指示器(tab的下划线)的高度。
android.support.design:tabBackground — 设置的背景。
android.suppor