Users delete information daily. Before you incorporate support for deleting information
in your application, think about the type of information that users delete and how
essential the information is. On one hand, if users accidentally delete something, they
might want the ability to retrieve the information. On the other hand, prompting users
to confirm every delete action can slow them down.
You can apply most of the information about deleting to the actions of removing and
resetting.
- Deleting: Deleting an item from the device
- Removing: Removing an item but not deleting it from the device (for example,
deleting a song from a playlist)
- Resetting: Returning values to a predefined state and losing all changes
You can use the following table to decide how to incorporate support for deleting
information in your application:
| Type of content |
Explanation |
Examples |
Action |
| Not critcal |
Users could reproduce the content easily |
- Removing a song from a playlist
- Removing an alarm setting
- Removing a tag on a photo
- Unliking a post on Facebook
- Removing an attachment from an outgoing email
|
Do not ask users to confirm that they want to delete the item.
|
| Moderate |
Users could lose valuable application data or content within an
application |
- Deleting an email
- Deleting a contact
- Deleting a playlist
|
Display a toast at the top of the screen that gives users the opportunity
to undo the deletion. Once users start to interact with the screen,
the toast should disappear after 3 seconds.
If you cannot position the toast at the top of the screen, you could
replace the deleted item with the toast.
|
| Critical |
Users could lose valuable data that impacts the device |
- Reset the device or an application
- Removing an email account
|
Display an inquiry dialog which describes the outcome of the delete
action.
This approach makes sure that users are aware of the situation and
must explicitly confirm the delete action before it occurs.
|
Implementation
You can allow users to delete or remove items in the following ways. Choose the
solution that works best for your application.
- In a context menu, users can touch and hold on an
item or use the multi-select gesture to open the context menu. Place the Delete
action at the bottom of the menu.
- In an action bar, users can open the action menu.
Place the Delete action at the bottom of the menu. You can use this approach
when users are in a content view (for example, reading an email, looking at a
picture, or viewing the details for a contact).
- Users tap an Edit button to act on a lot of data at one time.
Note: Do not allow users to reset values in the above ways. Incorporate a reset action
on a Settings screen.
Best practices
- Don't place a Delete action directly in an action
bar. If you want to include a Delete action, include it in an action
menu instead. This approach helps users avoid accidentally deleting an item.
Since the action menu button appears at the bottom right of the screen and the
Delete action appears at the bottom of the action menu, users can effectively
double-tap to delete an item.
- If users delete an item from a list or grid, remove the item from the
screen using a delete animation.
- If users delete an item from a content view (for example, an email or
contact), remove the item from the screen using a delete animation and return
users to the previous screen.