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
Not sure I quite understand your question. If you want to set the active tab to tab #2 do the following..
TabHost tabHost = getTabHost();
tabHost.setCurrentTab(1);
TabHost.setCurrentTab sets the active tab by index. Tab 1 has index 0, Tab 2 has index 1 and so on..
精彩评论