ogaclejapan / SmartTabLayout

A custom ViewPager title strip which gives continuous feedback to the user when scrolling
Apache License 2.0
7.09k stars 1.34k forks source link

How to centre circular tab inside SmartTabLayout when its layout width is match_parent #82

Closed amankumarjain closed 8 years ago

amankumarjain commented 9 years ago
<com.ogaclejapan.smarttablayout.SmartTabLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/tabs"
    android:layout_width="match_parent"
    android:layout_height="24dp"
    android:layout_gravity="bottom|center_horizontal"
    app:stl_clickable="false"
    android:layout_alignParentBottom="true"
    app:stl_customTabTextLayoutId="@layout/circular_tab"
    app:stl_dividerColor="@color/transparent"
    app:stl_dividerThickness="0dp"
    app:stl_indicatorColor="@color/accent"
    app:stl_indicatorCornerRadius="4dp"
    app:stl_indicatorGravity="center"
    app:stl_indicatorInterpolation="linear"
    app:stl_indicatorThickness="8dp"
    app:stl_underlineColor="@color/transparent"
    app:stl_underlineThickness="0dp"
    android:background="@android:color/holo_red_light"
    />
ogaclejapan commented 8 years ago

Hi, @amankumarjain I am sorry for the late answer. Already solved?

If the View in the custom tab layout width:8dp, the height:8dp I think that it becomes circular.