Add “menu” on every listview item

后端 未结 2 1336
醉话见心
醉话见心 2020-12-14 15:55

I\'m developing this app, which has a listview in it, but I want to add the \"three-dot\" icon in the corner, and when you press it, an awesome menu will popup. Like this in

相关标签:
2条回答
  • 2020-12-14 16:38

    I don't know how they do it or if this is the best way but you could create the overflow icon (3 dots) and use a PopupMenu for this. This was added in API 11 so it wouldn't work on older versions but if you are targeting API >= 11 then I think this would be a good option for you. I use it in a custom "actionbar".

    If this isn't awesome enough for you then you can also use PopupWindow which has been around since API 1

    PopupMenu

    PopupWindow

    0 讨论(0)
  • 2020-12-14 16:53

    I believe what you are looking for is a Popup Menu

    0 讨论(0)
提交回复
热议问题