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