0

I swapped out my PagerSlidingTabStrip for the new android.support.design.TabLayout and now the tabs show up in the center of the screen instead of left-aligned like they did with the PagerSlidingTabStrip. I want them to be aligned to the left of the screen like google play store on a landscape tablet (which is what PagerSlidingTabStrip gives me)

Jeremy
  • 601
  • 4
  • 14

1 Answers1

5

It looks like I need to set tabGravity to center and tabMode to scrollable.

<android.support.design.widget.TabLayout
        android:id="@+id/tabs"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimary"
        app:tabGravity="center"
        app:tabMode="scrollable" />
Jeremy
  • 601
  • 4
  • 14