[android-beginners] Re: How to close activities in the navigation stack?

2010-04-15 Thread Stormtap Studios
Oh that does sound like a much better way to do it.  Thanks!

On Apr 15, 8:59 am, ~ TreKing treking...@gmail.com wrote:
 On Wed, Apr 14, 2010 at 4:55 PM, Stormtap Studios
 r...@stormtapstudios.comwrote:

  Does this make sense?

 I think you might run into trouble if Android kills your activities on the
 bottom of your custom stack. Then when you press back from the top, you'd
 skip a few and may end up closing your app completely instead of going
 down the stack ... I think.

 Is there a better way?



 I would just use startActivityForResult() for each activity that gets
 started along the way. If you need to immediately drop down to the root
 activity, just pass a flag back in your result to indicate the previous
 activity should immediately flag its own previous activity and finish()
 itself, until you get back to the root.

 --- 
 --
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: How to close activities in the navigation stack?

2010-04-15 Thread Kitzy
Also look into the different flags you can set when you start an
activity, under Intent.java

-Kitzy

On Apr 15, 12:30 pm, Stormtap Studios r...@stormtapstudios.com
wrote:
 Oh that does sound like a much better way to do it.  Thanks!

 On Apr 15, 8:59 am, ~ TreKing treking...@gmail.com wrote:



  On Wed, Apr 14, 2010 at 4:55 PM, Stormtap Studios
  r...@stormtapstudios.comwrote:

   Does this make sense?

  I think you might run into trouble if Android kills your activities on the
  bottom of your custom stack. Then when you press back from the top, you'd
  skip a few and may end up closing your app completely instead of going
  down the stack ... I think.

  Is there a better way?

  I would just use startActivityForResult() for each activity that gets
  started along the way. If you need to immediately drop down to the root
  activity, just pass a flag back in your result to indicate the previous
  activity should immediately flag its own previous activity and finish()
  itself, until you get back to the root.

  --- 
  --
  TreKing - Chicago transit tracking app for Android-powered 
  deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en