Mathieu Plourde wrote: > Hello devs, > > Since I only have access to the emulators, I don't know if the problem > can be reproduced on real phones. I'm using setCurrentTab on a TabHost > to dynamically select a tab. When I am in portrait mode, it works, but > as soon as I change to landscape (ctrl + f12), it doesn't work > anymore. It doesn't send an exception, it just doesn't do anything. If > I switch back to portrait (ctrl + f12), it doesn't work either. That > means it just works when I first am in portrait mode. As soon as I > change, it stops working. In order to make it work again, I need to > close the application and reopen it. > > The TabHost is from the current activity, which is a TabActivity. > > Can you guys check if this happens to you too (emulator)?
Are you sure you are working with the correct TabHost instance? Bear in mind that when the screen is rotated, by default, your activity is destroyed and recreated. If you are holding onto an obsolete TabHost and telling it to change tabs, you would get the behavior you are seeing. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

