I've changed tabs from the activity inside a tab by using a broadcast intent before.
Example from a still very rough, unpublished app: Listening in the tab activity subclass for the broadcast: http://code.google.com/p/growing-phone-pet/source/browse/trunk/src/com/clickpopmedia/android/pet/ShowPet.java?spec=svn30&r=30#312 The receiver in the same, which calls a method that, among other things, changes the tab via the tab host: http://code.google.com/p/growing-phone-pet/source/browse/trunk/src/com/clickpopmedia/android/pet/ShowPet.java?spec=svn30&r=30#69 The activity inside the tab sending the intent: http://code.google.com/p/growing-phone-pet/source/browse/trunk/src/com/clickpopmedia/android/pet/Settings.java?r=30#31 This was just the first thing that came to mind when I needed it, and it happened to work. There might be far cleaner ways out there. For example, what if Activity#getParent() in the activity in the tab returns the TabActivity subclass? Then you'd just need to cast it, call TabActivity#getTabHost() on it, and make the call directly. Haven't tried that yet, though. On Feb 17, 6:46 am, ColletJb <[email protected]> wrote: > Hi, > > I'm currently working on an application, designed around a > TabActivity. > > It look like this: > > Main (TabActivity) > -> Tab1 (Activity) > -> Tab2 (Activity) > > Here, Tab1 has a button and I would like when the user click it, it > switches to Tab2... > > How can I do that ? > > Thank you -- 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 To unsubscribe, reply using "remove me" as the subject.

