美文网首页
TabLayout设置下划线长度

TabLayout设置下划线长度

作者: 十三妹儿儿儿 | 来源:发表于2019-07-31 10:54 被阅读0次

    TabLayout布局

    设置tabIndicatorColor为透明,tabBackground设置为selector

    effect_tabline_40布局

    line_green_40布局

    此方法用于固定的下划线长度,如果需要根据TabLayout中字的长度变化,

    这里有个参考文章https://www.jianshu.com/p/83922d08250b

    推荐试试三方的控件MagicIndicator

    github:https://github.com/hackware1993/MagicIndicator

    相关文章

      网友评论

          本文标题:TabLayout设置下划线长度

          本文链接:https://www.haomeiwen.com/subject/kyubsftx.html