I am wondering about how to change the tab width in Pager
Tab Strip
I have browse but it is like there are no one encountering the same problem as me..
My current layout is look like this:
But i am wondering how to create the tab that has small width like this with PageTabStrip
Most of them are using external library like ViewPagerIndicator
Is it possible to do it with PageTabStrip
? Thanks
Here is my current code
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v4.view.PagerTabStrip
android:id="@+id/pagerTabStrip"
android:layout_width="match_parent"
android:layout_height="30dp"
android:textColor= "@color/white"
android:layout_gravity="top" >
</android.support.v4.view.PagerTabStrip>
</android.support.v4.view.ViewPager>
The Question is answered here: PagerTabStrip tabs alignment to left
Use this before setViewPager():
sliding_tabs.setDistributeEvenly(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With