Android TabHost.setCurrentTab() not working
<p>I have a <code>TabActivity</code> that I am having problems after the device changes orientation. Followed some places on how to keep the current tab open after the change, but even tho I do get the correct tab number, it always sets it back to 0.    </p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    int currentTab = 1;
    if (savedInstanceState != null)
        currentTab = savedInstanceState.getInt("tabNumber");

    tabHost = getTabHost(); // (TabHost) findViewById(android.R.id.tabhost);
    createTabs(tabHost);
    tabHost.setCurrentTab(currentTab);
}

protected void onSaveInstanceState(Bundle outState) {
    outState.putInt("tabNumber", getTabHost().getCurrentTab());
    super.onSaveInstanceState(outState);
}
</code></pre>

<p>Am I doing something wrong here?</p>
