10

Android List view activity with item rows. User needs to be able delete some rows.

I know standard way in Android is to use item click menu. But it's 2 clicks. Is it best way?

2
  • 3
    Another potential alternative is the swipe to delete (or swipe to reveal a delete button), iPhone style. Commented Aug 21, 2010 at 18:55
  • 4
    Don't implement iPhone behavior. Android users don't know them.
    – OneWorld
    Commented Jan 25, 2011 at 23:48

2 Answers 2

10

It all comes down to how often the user will need to use delete function.

If it's very often, maybe consider adding a button to each list item.

If it's less often you should consider adding it to the items contextual menu (the long press menu). This is standard practice for most things.

I'm guessing when the user presses an item they will be taken to an activity with more information on it. You could add the delete button there or add it to the menu options on that activity (or both if really needed).

2
7

The interaction for deleting a list item needs to be complex enough to prevent accidents, yet not so difficult that it is a strain to delete multiple items.

For Android 3.x and 4.x, there is a recommendation by Google to use the "contextual action bar", whereby when an item is selected, you can add a delete icon to the action bar. See: http://developer.android.com/design/patterns/selection.html

An older, common interaction used on Android 2.x was to place the "Delete" action in a context menu activated by a long press on the list item.

One drawback for both these interfaces is that "Edit" and "Copy" or other common actions will often be near the "Delete" action, and so an irreversible "Delete" may require some additional form of confirmation input to prevent accidents. (Contrast this with the iPhonesque "swipe to reveal a delete button", which, by being unique and two steps, needs no confirmation.)

See Google's 2.x SMS "Messaging" app as an Android example: Deleting a item requires a long press, the selection of "Delete" from a crowded context menu, and then final confirmation of the delete in an alert dialog.

2

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.