Some Android system apps, such as the official Contacts edit screen, have introduced a behavior which is that exiting an edit screen using the back or up buttons is equivalent of saying "OK" and triggers the changes to be saved. To cancel changes, one actually needs to open the overflow menu and select "Delete changes".

Since this is done in an official app, I feel like it is the new way to go and try to implement it in my current project.

Therefore, I am stuck in the case in which I have a form that allows editing a certain type of data. There are cases in which the form cannot be accepted (such as if some fields have invalid values) and others that require confirmation from the user (such as removing a sub-item of the data that will affect other parts of the application).

Documentation is missing on that subject...

When encountering such cases, should I show a confirmation dialog as the user is pressing the Back button? This seems necessary but awkward to me, as it would block the user from going back as desired. Or should I put a save button somewhere in the UI and keep the back button for cancel?

If applying such principles, that would give :

Invalid fields scenario

1st back press : a dialog tells the user that the form contains invalid values.

2nd back press (on the dialog) : the activity containing the form is dismissed, changes are discarded.

Critical changes scenario

1st back press : a dialog tells the user that a designated change in the form contents is about to have destructive consequences, and gives a chance to cancel. Or it requests the choice of a policy to propagate such changes.

2nd back press : the activity containing the form is dismissed, changes are discarded.

1 Answer 1


If you try entering an invalid email address in Google contacts, and press Back, it gets saved without validation. This is bad UX. Also, the Back button itself has a lot of ambiguity when it comes to navigation and form submission.

http://www.androiduipatterns.com/2011/12/back-button-androids-achilles-heel.html http://www.androiduipatterns.com/2012/07/i-was-watching-navigation-in-android.html

Regardless of what the guidelines suggest, the UI of the form you design depends on its function. If your form has fields to validate, it is always good to have a Submit or Confirm or Validate button. This gives users an idea on what has to happen next. Here are a few examples.

enter image description here

enter image description here

You can check http://pttrns.com/ for more such examples

Your Answer

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

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