Search code examples
androidandroid-layoutuser-interfacekotlinuser-experience

How to properly design list item with actions


It probably will be an opinion based answers rather than fixed ones, but I thoughts it wouldn't be bad to ask this question and get opinions from more experienced developers.

I am implementing in my app recycler view, that each item in the recycler view should have some actions, for example

  • delete, reminders, spinners, change icons and some others.

Currently I implemented the delete and change icon logic with both swipe action, and contextual action mode(on click the app bar changed to "new" app bar with delete button)

I thought to continue to implement all the other actions, like reminders and spinners in the item itself but I don't know if it's a good idea.

After some research I have several approaches in my mind:

  1. throw all the actions right in the item view itself, which mean the user see right away all the possible actions.

  2. use popup menu(three dots on the item, and open little menu with actions)

  3. expand the contextual action mode that will include all actions

  4. Maybe even completely different approach and put all the actions inside the item detail screen

What do you think is a better approach?


Solution

  • For what it's worth, the Material Design specs (scroll down to List Controls, I can't get a link to it HOW IRONIC) recommend a primary and (optional) secondary action, with possible left and right swipe gestures (which are usually understood to be "get rid of this item" in some way, like archive and delete)

    Personally I think that's a good way to go (and you don't need to follow MD but it's a good base set of principles, especially if you're not a designer or UX person yourself) - it avoids clutter, and makes it clearer to users what their main options are.

    You can implement tap behaviour on the list item to bring up a dialog (fullscreen or otherwise) where you have room to add lots of other options, labels to explain them, etc. You're not limited to the size of a list item, and you can easily add to it in future if you need to, instead of being committed to trying to fit everything into a list item.

    Plus there's accessibility to think about - list items are small, you don't get much space (especially on smaller devices, where the user has large fonts enabled) so where are you gonna put all that stuff? Moving some to a contextual action mode works, but there's not much space there either, and the user has to realise they need to look up there. Will it work well for blind users relying on linear navigation?

    Basically you can avoid a lot of these troubles by following established patterns, where other people have done the work to make it all "just work". My own personal experience has been trying to do things in a different way, and eventually coming back to the "recommended" way and wishing I'd done that to begin with!