Context: My app has a list of entries. It uses an ExpandableListView to display the entry date and type as a group, and when you short-press it, it expands to show detailed data on that entry. It also uses a long-click to bring up a context-menu for each entry, from which the user can select some action - "Delete", "Edit" and "Edit Date".

Reading the Android UI guidelines recently, long-press has been changed such that it should be a "selection" action rather than a "display context-menu" action. I'm happy with this - my context menu isn't all that visible.

But I'm not certain how to implement my contextual actions anymore.

These actions wouldn't support multi-select (Delete could, but doesn't have to - I think it would be rare to have to delete multiples), so I'm not certain about the selection contextual action bar. I saw an example that changed the View for the entry to be a Spinner, and you short-press to drop-down the spinner and inside there are actions. Great - it's visible because of the little notch in the bottom-right, and it's single-entry only. Unfortunately, because I'm using an ExpandableListView, doing this means that the child no longer expands!

This section of the app is for viewing data you've already input, and is not the main focus of the app. The actions would be rarely used in relation to the rest of the app, and so do not need more prominence.

The actual question: How would you combine a parent/child relationship (ExpandableListView being one way of doing this), with single-select contextual actions?



Entry list Context menu

A few app screenshots, hopefully that's ok rather than a mockup. The context menu is presently brought up by long-pressing, but I wanted to change to the "new" Android long-press design.

  • Would be good if you provide some mockups to go with the question.
    – rk.
    Jul 6, 2013 at 0:54

2 Answers 2


What's wrong with using the recommended Contextual Action Bar pattern? You can -- and most often should -- provide different choices in the Contextual Action Bar depending on the number of items in the selection.

Adjusting actions in the CAB as additional items are selected

If there are multiple items selected, you show only Delete. If only one item is selected, you can also show Edit. Since you're not showing Share buttons, the Delete and Edit buttons would appear for the user without going into a second-level menu as in this screenshot. Be sure to use the standard icon for Delete and Edit.

(Aside: Why are "Edit" and "Edit Game Date" separate actions? Can the edit screen support changing all attributes including the date in the same place?)

If you're worried about accidental deletes, add a confirmation before deleting any (or maybe only multiple) items:


  • This is a good answer, I particularly like the screenshots! I didn't realize that the Gallery had different actions depending on single/multiple select. There's nothing "wrong" with it, but it felt like the CAB should be more for multi-select - this shows me that I was wrong. As for Edit/Edit Game Date - the primary editing screen is only for editing score values. The editing of a date is an advanced action and so isn't shown on the basic screen.
    – rythos42
    Jul 8, 2013 at 16:27
  • Also - the addition of a "Share" button is what prompted me to read the UI guidelines and start asking this question. :)
    – rythos42
    Jul 8, 2013 at 17:16

I'm fairly new to Android but...

I notice the Gallery app lets one select by long pressing, then the status bar changes to what is basically a menu, there's the share icon, the trash icon and some other things. If this is according to current guidelines, you could do something similar, upon select transform your Expand All button into a similar menu. You could either put icons for the 3 options, or have a drop down menu with the options spelled out.

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.