Question

I need to create a UI just like below.

enter image description here

When I write the code and run the application, it loads first tab which is "Categories". What I need is to load second tab, which is "Home" when I run the application without changing the Tab order.

Below is my code.

Était-ce utile?

La solution

It doesn't matter if it's PagerSlidingTabStrip or another, what you need is to set the current item of your viewpager :

setCurrentItem(int item)

Set the currently selected page.

Autres conseils

use this code to make second tab as default tab.

actionBar.setSelectedNavigationItem(1);

it works.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top