Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PagerTabStrip - show all tabs on screen like a normal actionbar tab implementation?

Tags:

android

I'm using PagerTabStrip with ViewPager:

<android.support.v4.view.ViewPager>
    <android.support.v4.view.PagerTabStrip />
</android.support.v4.view.ViewPager>

It seems the style of PagerTabStrip is different than the tab widget you use with the actionbar, in that the tab positions are not fixed. Is there a way to force that positioning/styling?

My pager only has two tabs, and it looks really silly to not have both tabs visible at once.

Thanks

like image 496
user3203425 Avatar asked Sep 29 '14 16:09

user3203425


1 Answers

Unfortunately, tabs in PagerTabStrip don't work the way tabs in ActionBar do. You can either use the ActionBar or create a custom strip.

like image 148
Fox Avatar answered Nov 15 '22 01:11

Fox