I have a TabActivity and inside 5 tabs with 5 activities each one. I want to set one of my tabs but not from the TabActivity(clicking on the tab on the top) but from an activity of any tab, for example clicking on a button of activity 3(which is asociated with the 3rd tab).
In my TabActivity there is a variable mTabhost, which I can use to set the selected tab with
mTabHost.setCurrentTab(0);//home
I guess I need access to that variable from Activity1-2-3-4, and doing that variable static doesnt work.
Say you have a
MyTabActivityasTabActivity, which hosts 5Activity(ies).If you want to change the Tabs inside
SecondActivity, you would write the code something like this.Here you have your MyTabActvity
you can change the tabs like: