kiran
kiran

Reputation: 3264

how to change the Tab focus in tabhost?

I am new to Android.

I am implementing coding related to tab host.

I created three tabs named tab1,tab2,tab3 in tab host.

When i am starting my application tab1 is automatically fired.

My intention is when i am starting my application tab2 is fired automatically.

with out changing thee positions.

if any one has idea please help me

Thanks in advance

Upvotes: 2

Views: 2186

Answers (1)

87element
87element

Reputation: 1939

onCreate(Bundle savedInstanceState){    
TabHost tabHost = ...;
    tabHost.setCurrentTab(1);//index of second tab
...
}

Or as an option - move a content from second tab to first one.

Upvotes: 3

Related Questions