Domanda

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.

È stato utile?

Soluzione

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.

Altri suggerimenti

use this code to make second tab as default tab.

actionBar.setSelectedNavigationItem(1);

it works.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top