smarttablayout

本文介绍了SmartTabLayout库的使用,提供了高度可定制性和灵活性。通过引入库,设置布局文件中的属性,可以自定义指示器宽度、高度以及标签间的分割线,相比原生TabLayout更加灵活。同时,需要注意特定属性组合可能导致UnsupportedOperationException。
摘要由CSDN通过智能技术生成

github地址 https://github.com/ogaclejapan/SmartTabLayout

为什么要用这个 可定制性高 使用灵活

1.引入

implementation 'com.ogaclejapan.smarttablayout:library:1.7.0@aar'

2.布局文件使用

 <com.ogaclejapan.smarttablayout.SmartTabLayout
                android:id="@+id/tabs"
                android:layout_width="match_parent"
                android:layout_height="42dp"
                android:layout_gravity="center_horizontal"
                android:background="@color/colorWhite"
                app:stl_indicatorColor="@color/home_color_fault"
                app:stl_indicatorWidth="56dp"
                app:stl_indicatorCornerRadius="1.5dp"
                app:stl_indicatorThickness="3dp"
                app:stl_indicatorInFront="true"
                app:stl_dividerThickness="1dp"
                app:stl_dividerColor="@color/home_color_line"
                app:stl_customTabTextLayoutId="@layout/tab_layout"
                app:stl_customTabTextViewId="@+id/id_tv_title"
                app:stl_distributeEvenly="true"
                app:stl_underlineThickness="0dp" />

各属性介绍

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值