Get index of selected tab in tabHost
I'm trying to store the index of the currently selected tab in onSaveInstanceState so I can restore it. However the getCurrentTab apparantely gives me back the String I used in the etTabHost().newTabSpec, which I find a bit weird since the documentation says it returns an int and setCurrentTab also taking an int. Does anyone know how I can get the index of my currently selected tab so I can restore it? Jorgesys you are on the right way, use setOnTabChangedListener to get your selected tab. public class MainActivity extends TabActivity { static TabHost mytabs; mytabs = getTabHost(); mytabs