I am using the TabLayout from Android Design support library. How can I use MODE_SCROLLABLE along with GRAVITY_FILL so that it looks the same across all devices and orientations?
Currently if I use MODE_SCROLLABLE, it looks good on 7" tablet, but on 10" tablet, the tabs are aligned to the left. I want to be able to use GRAVITY_FILL for all sizes.
This is my tablayout:
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="72dp"
/>
and I am setting the mode in code
tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);