TabLayout布局
设置tabIndicatorColor为透明,tabBackground设置为selector
effect_tabline_40布局
line_green_40布局
此方法用于固定的下划线长度,如果需要根据TabLayout中字的长度变化,
这里有个参考文章https://www.jianshu.com/p/83922d08250b
推荐试试三方的控件MagicIndicator
TabLayout布局
设置tabIndicatorColor为透明,tabBackground设置为selector
effect_tabline_40布局
line_green_40布局
此方法用于固定的下划线长度,如果需要根据TabLayout中字的长度变化,
这里有个参考文章https://www.jianshu.com/p/83922d08250b
推荐试试三方的控件MagicIndicator
本文标题:TabLayout设置下划线长度
本文链接:https://www.haomeiwen.com/subject/kyubsftx.html
网友评论