frisbee
frisbee copied to clipboard
Avoid circular navigation for Activities accessible via nav drawer
This is to avoid circular navigation adding to stack: Home > GDE > Pulse > GDE > Home
That's a really good problem that we have for a long time. Thanks for bringing that up.
I don't know if having singleTask is the best solution to that. We can also use Intent flags to do this. I guess we don't have to set it Manifest level.
@tasomaniac I think flags should be used to override the default behaviour defined in the manifest. Also, if you look at gmail's behaviour, pressing back from any of the activities brings you home. Maybe we shouldn't add them to the backstack?
Exactly, flags should be override the default behavior. And default behavior should not be singleTask in our case. These Activity's can potentially be launched by other screens like widgets notification etc. In those cases, new task should be created. Putting singleTask in Manifest makes it impossible.
But I agree with you about the behavior. It's bad. We should be more intelligent.