문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

use this code to make second tab as default tab.

actionBar.setSelectedNavigationItem(1);

it works.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top