0

When you enter my app, you always go to the main screen with some quick details/information. There is a navigation drawer which contains 3 items: Recordings, Videos, Settings. I would prefer navigation work where Recordings and Videos are the top activity actions, so if you navigate down either and press Up/Home or Back button, you would ultimately navigate back up to the Main Screen. So if you switch from Recordings to Videos, and press back, you should go back to Main and vice a verse. Main should always be the ultimate top activity.

If you hit Settings, you should go back to where ever you previously came from (i.e. if on videos, go back to videos, if on recordings go back to recordings or if on main, go back to main). Settings is cross-cutting and should always take you back to where you previously were.

How do I best implement this with the Navigation Drawer? I believe it will be something with clearing the stack once you enter either Recordings or Videos, but I am unsure what it is I need to search for to find this.

dmfrey
  • 1,230
  • 1
  • 17
  • 33

1 Answers1

0

The fix was to override onBackPressed to navigate back to the main screen, so long as the appropriate launchMode is set in either the Android Manifest or Intent flags.

Thanks @cricket_007

dmfrey
  • 1,230
  • 1
  • 17
  • 33