The answer is that its complicated. You need to switch not only the View, but the entity that the system considers to be active. As Dianne suggests android.app.LocalActivityManager is where I'd start, http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/LocalActivityManager.java . A lot of the heavy lifting is done here, but there's also android.widget.TabHost and android.app.ActivityGroup (which TabHost extends), and android.app.ActivityThread.
Cheers, Justin Android Team @ Google On Feb 10, 1:36 pm, Dianne Hackborn <[email protected]> wrote: > Well it doesn't use a ViewFlipper. :} I suggest looking at the code. > > > > On Tue, Feb 10, 2009 at 11:43 AM, kingkung <[email protected]> wrote: > > > I'm trying to implement my own ActivityGroup to mimic TabActivity > > (without tabs) but I'm having trouble "closing" activities. My > > ActivityGroup has a ViewFlipper, each housing a separate activity's > > window. When I attempt to switch "activities" I call > > ViewFlipper.setDisplayedChild() on the view of choice. > > > However, when I scroll up and down in the view of choice, the OTHER > > non-visible activities' views are responding to these actions, so it > > seems like I'm not successfully "switching" the activity fully. > > > When I use a TabActivity to run this code, this doesn't happen; when I > > scroll up and down in one activity, I don't see any event firing from > > any of the other activities. > > > I'm wondering... what does TabActivity do to handle these activities > > as separate, individual entities? > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

