MagicIndicator设置指示器Title字体大小:
MagicIndicator magicIndicator = (MagicIndicator) findViewById(R.id.magic_Category);
magicIndicator.setBackgroundColor(Color.parseColor("#d43d3d"));
CommonNavigator commonNavigator = new CommonNavigator(this);
commonNavigator.setSkimOver(true);
int padding = UIUtil.getScreenWidth(this) / 2;
commonNavigator.setRightPadding(padding);
commonNavigator.setLeftPadding(20);
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
@Override
public int getCount() {
return categoryList == null ? 0 : categoryList.size();
}
@Override
public IPagerTitleView getTitleView(Context context, final int index) {
ClipPagerTitleView clipPagerTitleView = new ClipPagerTitleView(context);
clipPagerTitleView.setText(categoryList.get(index).CategoryName);
clipPagerTitleView.setTextColor(Color.parseColor("#f2c4c4"));
clipPagerTitleView.setClipColor(Color.WHITE);
//字体大小设置参考此处
clipPagerTitleView.setTextSize(30);//设置指示器Title字体大小
clipPagerTitleView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
vpCategory.setCurrentItem(index);
}
});
return clipPagerTitleView;
}
@Override
public IPagerIndicator getIndicator(Context context) {
return null;
}
});
最后
以上就是暴躁冰淇淋最近收集整理的关于MagicIndicator设置指示器Title字体大小的全部内容,更多相关MagicIndicator设置指示器Title字体大小内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复