PagerTabStrip - show all tabs on the screen, like a normal tab implementation in the action bar?

I am using PagerTabStrip with ViewPager:

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

It seems that the style of PagerTabStrip is different from the tab widget that you use with the action bar, since the positions of the tabs are not fixed. Is there any way to force this positioning / style?

My pager has only two tabs, and it's really stupid that both tabs are not displayed immediately.

thanks

+6
source share
1 answer

Unfortunately, tabs in PagerTabStrip do not work like tabs in ActionBar . You can use an ActionBar or create a custom strip.

+2
source

Source: https://habr.com/ru/post/976017/


All Articles