7

I have an Android app with several different categories that the user can navigate between using navigation drawer. These categories have drill down views that replace the hamburger icon with a software back button.

What if the user open the app, opens the navigation drawer, selects another category, then presses the hardware back button? Since the app is at root level, should I exit the App? Or should the user be redirected back to the home page?

Different Android apps behave differently. For example GMail and Google Play redirect to previously navigated page. Google Maps and Reddit Sync exit the app.

Which behavior makes the most sense?

3 Answers 3

1

It depends on the app but from your description above...

if the user open the app, opens the navigation drawer, selects another category

I would have the hardware back button show the previous screen since the navigation categories are hidden away in a navigation drawer.


1. The control I pressed to update the screen is no longer visible.

If the thing you pressed changes the screen and is no longer visible then the back button is expected to change the screen back to where it was before the change.

Here is one example of hiding the buttons that change the view...

hidden

Pressing back here should go to where I was before choosing TOP

2. The control I pressed to update the screen is visible (providing context).

This case could go either way and depends on a number of variables most importantly your specific users. In general, if there are only 3 tabs that never go away then using the back button to switch back to the previous tab would most likely be annoying.

Having the back button change to the previously highlighted button on the segmented control below isn't necessary...

segmented

3

According to Google's navigation guidelines, the correct behaviour for your described case of hitting back button is to return to the previous screen, which will be the previous category.

They outline 3 cases for the back button.

When details screens are independent and only accessible via the Hub screen

enter image description here

This is your above case where your categories are independent within the app. Because the categories are considered to be distinct items, the back button returns you to the previous screen.


When sibling screens are accessible using swipe action

enter image description here

Because the sibling screens are easily accessible by swiping, they are considered to be cards on a single screen. Hitting the back button returns you to the main element.


When app is launched via widget

enter image description here

If the app is launched from a widget that takes you directly to a "details" page. The action of the back button should first take you to the main screen of your app. Only if the user taps on back again, is the app closed. The reason being when you tapped from a widget into the details. It make sense to allow the user to zoom out to look review the context which is provided by the main app screen. That is why it does not directly close the app.

They provide more examples on app to app navigation behaviour in the link. If you're interested in the subject.

1
  • 1
    Which parts are actually relevant to a NavigationDrawer, which is accessible at all times without changing backstack by being shown? To me, the case is more like the one with "sibling screens", though without "direction navigation". Kind of like tabs whose visibility can be toggled.
    – kaay
    Jul 8, 2016 at 9:23
2

Nick Butcher, a Google Design/Developer advocate, advises to clear the back stack on switching categories using the navigation drawer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.