2

Is it possible to check if there are any activities below the current activity from my own application? Example:

ActivityMain  // no more activities from our app in the stack
ActivityNext  // one other activity from our app in the stack

I'm using the ActionBar, and let's say I'm at ActivityNext - I want to know if I should call setDisplayHomeAsUpEnabled() with a true or false value. If I'm the only activity in the stack, I want to pass in "false", otherwise "true".

I can try to book-keep this manually, but it wondering if there's a way to query the activity stack instead,

Thanks

user291701
  • 38,411
  • 72
  • 187
  • 285
  • Check out http://stackoverflow.com/questions/5975811/how-to-check-if-an-activity-is-the-last-one-in-the-activity-stack-for-an-applica/6242122#6242122 , however, having some kind counter in your app probably would be faster and more reliable. – sandrstar Feb 24 '12 at 04:26

0 Answers0