java – How to align tab indicator to bottom left in TabLayout-ThrowExceptions

Exception or error:

I have Tablayout with 3 tabs. I want to show TabIndicator at bottom left side. Now it shows bottom center.

                    <com.google.android.material.tabs.TabLayout
                        android:id="@+id/tab_contents"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:background="@drawable/bg_top_corner_white"
                        android:paddingStart="16dp"
                        android:paddingTop="5dp"
                        android:paddingEnd="16dp"
                        auto:tabIndicator="@drawable/tab_indicator_spot"
                        auto:tabIndicatorColor="@color/black"
                        auto:tabIndicatorFullWidth="false"
                        auto:tabIndicatorGravity="bottom"
                        auto:tabIndicatorHeight="@dimen/_4sdp"
                        auto:tabMode="scrollable"
                        auto:tabSelectedTextColor="@color/black" />
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *