I am using Google new TabLayout from the design support library and wondered how I can centralize the active tab inside this layout.
I am currently posting the entire layout as follows:
<android.support.design.widget.TabLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" />
And now I would like to focus the active tab inside this layout. Something like this was done before TabLayout. No matter how many tabs were there, the active one was always in the center. How can i do this? Thanks.
source share