Sunday, December 2, 2018

android - Navigation drawer and hardware back button: when on root level, exit app or go back?


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?



Answer




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


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...