On Sun, Sep 5, 2010 at 6:23 PM, JimBadger <[email protected]> wrote:
> I'm developing a non-realtime Android game, and am having trouble
> figuring out the best way to sequence and control my activities.
>
> For example, when the user first installs and runs the app, he's into
> Activity 1: The Game.  He selects a new game slot (1 of 3) and goes to
> Activity 2: Create Character, and from there Activity 3: World Map.
>
> That scenario highlights two of my problems:
>
> 1) If the user presses the back button on Activity 3, I don't want him
> going back to Activity 2, I'd want him back on the main menu; Activity
> 1.....but....

Have Activity 2 call finish() after calling startActivity() for
Activity 3. When the user presses BACK in 3, 2 is gone, so they will
return to 1.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

-- 
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

Reply via email to