angcyo / DslTabLayout

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

app:tab_indicator_gradient_start_color 加上不起作用 #55

Closed budaowengd closed 2 years ago

budaowengd commented 2 years ago
        <com.angcyo.tablayout.DslTabLayout
            android:id="@+id/tabLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"

            app:tab_indicator_color="@color/red"
            app:tab_indicator_radius="3dp"
            app:tab_indicator_shape="LINE"
            app:tab_indicator_solid_color="@color/red"
            app:tab_indicator_stroke_color="@color/red"
            app:tab_indicator_gradient_start_color="@color/red"
            app:tab_indicator_gradient_end_color="@color/red"
            app:tab_indicator_stroke_width="3dp"
            app:tab_indicator_width="WRAP_CONTENT"

            app:tab_enable_text_bold="true"
            app:tab_item_is_equ_width="true"
            app:tab_select_color="@color/white"
            app:tab_deselect_color="@color/white"
            app:tab_text_max_size="@dimen/pt_16"
            app:tab_text_min_size="@dimen/pt_14"
            tools:layout_height="50dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="111" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="2222" />

        </com.angcyo.tablayout.DslTabLayout>

手动配置drawable的属性, 不显指示器

angcyo commented 2 years ago

去掉tab_indicator_stroke_width属性, 或者值改成1dp 即可显示.