0

In my Android application I have an activity where I've been using [Activity(NoHistory=true)] to keep the activity from appearing on the activity stack.

Now I'd like to make it conditional - sometimes it should be on the activity stack so the user can press Back to return to it from a subsequent screen; sometimes it shouldn't. Is there a way to "decorate" an activity conditionally or must I write some code to accomplish this?

Thanks in advance.

billmaya
  • 1,311
  • 3
  • 15
  • 34
  • i don't see such property/getter/setter in orginal android doc so i don't think if it will work ... anyway if you know that next in order activity will should run without apearing in history you can start it with flag FLAG_ACTIVITY_NO_HISTORY – Selvin Oct 26 '12 at 12:32

1 Answers1

0

Are you looking for intent flags that can be set like the one below ? You could use that to start an activity and set the flag conditionally.

intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
Deepak Bala
  • 11,095
  • 2
  • 38
  • 49