【问题标题】:How to make tablayout tabitem text size equal?如何使 tablayout tabitem 文本大小相等?
【发布时间】:2020-02-17 20:43:27
【问题描述】:

我尝试了其他 StackOverflow 答案 How to make tablayout text size equal? 但它不适用于我的情况,所以我问这个问题请帮帮我。

<com.google.android.material.tabs.TabLayout
                android:id="@+id/tabslayout"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:layout_alignParentBottom="true"
                android:layout_gravity="bottom"
                android:background="@color/white"
                android:minHeight="?android:attr/actionBarSize"
                app:tabBackground="@color/gray"
                app:tabContentStart="72dp"
                app:tabTextAppearance="@style/MineCustomTabText"
                app:tabTextColor="@color/black">

                <com.google.android.material.tabs.TabItem
                    android:id="@+id/TAB_OPINION"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text=""
                    app:tabMode="scrollable"
                    app:tabGravity="fill"
                    app:tabIndicatorHeight="5dp"/>

                <com.google.android.material.tabs.TabItem
                    android:id="@+id/TAB_FUNFACTS"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text=""
                    app:tabMode="scrollable"
                    app:tabGravity="fill"
                    app:tabIndicatorHeight="5dp"/>
            </com.google.android.material.tabs.TabLayout>

【问题讨论】:

  • 问我什么谢谢
  • 如果您没有得到答案,请点赞。

标签: android android-layout


【解决方案1】:

让 tablayout 可滚动对我有用。

                app:tabMode="scrollable"

【讨论】:

    猜你喜欢
    • 2016-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-31
    • 1970-01-01
    • 1970-01-01
    • 2021-05-23
    相关资源
    最近更新 更多