gdg-x / frisbee

[DEPRECATED] Android application for GDG members and organizers
https://play.google.com/store/apps/details?id=org.gdg.frisbee.android
Apache License 2.0
265 stars 169 forks source link

Avoid circular navigation for Activities accessible via nav drawer #685

Open esoxjem opened 7 years ago

esoxjem commented 7 years ago

This is to avoid circular navigation adding to stack: Home > GDE > Pulse > GDE > Home

tasomaniac commented 7 years ago

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.

esoxjem commented 7 years ago

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

tasomaniac commented 7 years ago

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.