by rdomloge » Wed Jan 28, 2009 12:33 am
I have been having similar problems. As I understand it, TabHost was released as deprecated code, but was un-deprecated in v1.0. I get the impression it is buggy code which will need to be revised. The example code out there is basic to say the least and many of the apps in the Market are choosing to use their own tabbing implementations.
Are you using Intents for the contents of your tabs?
Can you post some code?
I have been using Intents and that seems to work reasonably well, except for orientation like you say. I suspect that their is either a bug in the implementation or the design is flawed.
I don't have a problem with the tab contents not being remembered though - rotation causes onCreate() to be called again and I set up the tabs in this method.
My issue is that, re-creating each tab upon rotation causes the managed dialog mechanism to fail. The dialogs that are being managed are forgotten when the tab is replaced.
I have recently been advised not to use Intents to create the tabs, so I will be experimenting with alternatives in the near future.
Post up some code samples and I'll take a butchers.