views:

49

answers:

1

I have a tabHost with tree tabs. How can I access a specific tab from the tabHost activity when this tab is not active at the moment. And a second question to this topic... How can I access the activity of a tab from another tab?

I need this, because I have to update the second tab when something changes on the first tab.

Thank you

A: 

you can simply get it by using the below code tabHost.setCurrentTab(0),if you want first tab

MGS
But with this statement the current tab is changed. I would not change the current tab, but I need to access another tab than the current.
Mossi
please go through from android developer guide,you can use some thing like tabHost.setOnTabChangedListener(new TabHost.OnTabChangeListener() { @Override public void onTabChanged(String arg0) { if (arg0.equals("tab1")) { Something u needor to call anaother tab host activity by setcurrentTab or else use StartActivity }
MGS
and go through getcurrentTab()
MGS
ok, thank you. I will try this way
Mossi