After clicking on a button in DialogFragment, I want to switch to tab number 3. How can I do this?
In Tab Fragment:
public void setCurrentTab(int tab_index){
mTabHost = (FragmentTabHost)getActivity().findViewById(android.R.id.tabhost);
mTabHost.setCurrentTab(tab_index);
}
In click event of the button of DialogFragment:
FragmentTabHost tabHost = (FragmentTabHost) getActivity().findViewById(android.R.id.tabhost);
tabHost.setCurrentTab(3);