angcyo / DslTabLayout

:hearts: Android界最万能的TabLayout(不仅仅是TabLayout), 支持任意类型的item, 支持Drawable类型的指示器,智能开启滚动,支持横竖向布局等
https://github.com/angcyo/DslAdapter
MIT License
1.55k stars 145 forks source link

item组合的时候,是不是无法改颜色? #38

Closed jingzz1 closed 3 years ago

jingzz1 commented 3 years ago
  <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:gravity="center"
            android:background="@drawable/click_bg">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="21dp"
                android:adjustViewBounds="true"
                android:src="@mipmap/module_msg"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="消息"
                android:textSize="11dp"
                android:layout_marginTop="4dp"
                android:textColor="@color/gray_33"/>

        </LinearLayout>

像这种,linearLayout里一个imageView和一个textView,tab_select_color和tab_deselect_color设置无效是吗?

angcyo commented 3 years ago

调用com.angcyo.tablayout.DslTabLayout#configTabLayoutConfig

修改onGetTextStyleViewonGetIcoStyleView属性.