0

I tried other StackOverflow answer How to make tablayout text size equal? but it's not working in my case so I ask this question please help me out.

<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>
subrata sharma
  • 344
  • 4
  • 17

1 Answers1

0

making the tablayout scrollable does the work for me.

                app:tabMode="scrollable"

subrata sharma
  • 344
  • 4
  • 17