I know it sounds stupid but I recently started studying fragments/fragmentactivity to replace tabactivity.. but the simple problem is that I don’t know how to switch the tab from current tab i.e. in tabactivity hosting activities, used this to open tab 1
TabActivity tabMap = (TabActivity) getParent();
tabMap.getTabHost().setCurrentTab(1);
How can I do the same with FragmentActivity hosting tabs (fragments)??
Thanks
As long as I understood, you want something like this (assuming getParent() returns Activity)
BTW, switching to ActionBar tabs is recommended, not hard and it will look much better and you would’nt have to use deprecated stuff.