Basically, I noticed that my application drops back to the default tab (in a four tab layout) whenever I change orientation. The data within those tabs stays the same, so that stuff is getting saved, but what I want is to catch the current tab number and revert to that whenever swapping between landscape or portrait.
My tab layout is all in onCreate. What I have been trying is something like this:
Using java Syntax Highlighting
- tabs.setCurrentTab(tabNumber);
Parsed in 0.029 seconds, using GeSHi 1.0.8.4
And then i'm trying to catch tabNumber with something like this:
Using java Syntax Highlighting
- tabs.setOnTabChangedListener(tabchangedlistener);
- private TabHost.OnTabChangeListener tabchangedlistener =
- new TabHost.OnTabChangeListener(){
- public void onTabChanged(String tabId) {
- // TODO Auto-generated method stub
- tabNumber = tabs.getCurrentTab();
- }
- };
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
Ain't working.
Any thoughts on how I can do this?

