Android: ListView elements with multiple clickable buttons

后端 未结 8 1175
天命终不由人
天命终不由人 2020-11-22 01:58

I\'ve a ListView where every element in the list contains a TextView and two different Buttons. Something like this:

ListView
------------------         


        
8条回答
  •  情深已故
    2020-11-22 02:21

    Isn't the platform solution for this implementation to use a context menu that shows on a long press?

    Is the question author aware of context menus? Stacking up buttons in a listview has performance implications, will clutter your UI and violate the recommended UI design for the platform.

    On the flipside; context menus - by nature of not having a passive representation - are not obvious to the end user. Consider documenting the behaviour?

    This guide should give you a good start.

    http://www.mikeplate.com/2010/01/21/show-a-context-menu-for-long-clicks-in-an-android-listview/

提交回复
热议问题