SmartTabLayout icon indicating copy to clipboard operation
SmartTabLayout copied to clipboard

set tab title Typeface from BOLD to NORMAL

Open iielse opened this issue 7 years ago • 3 comments

image 能否在xml配置中提供一个 "标题是否用粗体"的属性值 app:stl_defaultTabTypeface="bold|normal|italic|bold_italic"

跪求楼主速度加上 image

iielse avatar Jul 31 '17 09:07 iielse

public class SmartTabLayout1 extends SmartTabLayout {
    ...
    @Override
    protected TextView createDefaultTabView(CharSequence title) {
        TextView textView = super.createDefaultTabView(title);
        textView.setTypeface(Typeface.DEFAULT);
        return textView;
    }
}

感谢楼主用了 protected 修饰符, 但是我仍然希望能够在xml配置中直接配置这个特性

iielse avatar Jul 31 '17 09:07 iielse

希望是可以在xml中直接配置选中和未选中状态时的粗细体显示, 选中时粗体, 未选中时细体, 这是蛮正常的设计

zhangqixiang-sh avatar Sep 26 '18 07:09 zhangqixiang-sh

希望是可以在xml中直接配置选中和未选中状态时的粗细体显示, 选中时粗体, 未选中时细体, 这是蛮正常的设计

呃 ... 如何配置呢?默认是选中和未选中都是细体,而且选中和未选中的字体颜色也一样...

congjinruo avatar Feb 19 '19 08:02 congjinruo