Please sign in to comment.
ClassifyActivity: Use launchMode=singleTop.
So the Up button (from Help/Examples, or List, for instance) is more like the back button. Otherwise, Up navigation (correctly) ignores the back stack and just creates a new instance. But our ClassifyActivity has lots of state that we don't want to lose. Alternatively, we could have used FLAG_ACTIVITY_CLEAR_TOP when navigating up, but this seems simpler. I do wonder exactly how this is dealt with in standard apps, such as when writing an email, pressing a button to launch a photo chooser activity and then pressing Up to come back, without losing the contents of the email. However, I cannot find a real-world example like that that actually has an Up button in the helper activity.
- Loading branch information...