Question Detail

com.ogaclejapan.smarttablayout.SmartTabLayout center align

6 years ago Views 1516 Visit Post Reply

I am Using com.ogaclejapan.smarttablayout.SmartTabLayout for Tab but I want it center align
SmartTabLayout Demo1
I want it like this. How can I do it???


Thread Reply

Anonymous

- 6 years ago

After searching i got the answer you can use this for your required View.

<com.ogaclejapan.smarttablayout.SmartTabLayout
    android:id="@+id/diet_viewpagertab_ID"
    app:stl_clickable="true"
    app:stl_defaultTabBackground="@color/colorAccent"
    app:stl_defaultTabTextAllCaps="true"
    app:stl_defaultTabTextColor="@color/headtextcolor"
    android:layout_width="match_parent"
    android:layout_height="?android:actionBarSize"
    app:stl_dividerColor="#4D000000"
    android:layout_gravity="bottom|center_horizontal"
    app:stl_dividerThickness="1dp"
    app:stl_drawDecorationAfterTab="true"
    app:stl_indicatorColor="@color/headtextcolor"
    app:stl_indicatorCornerRadius="10dp"

    app:stl_indicatorGravity="bottom"
    app:stl_indicatorInterpolation="smart"
    app:stl_indicatorThickness="3dp"
    app:stl_underlineColor="#4D000000"
    app:stl_underlineThickness="1dp"
    app:stl_distributeEvenly="true"
    />