Context menu similar to the new Play Music application (v5.0.0)

You may have noticed three dots next to each song in the new Play Music app (starting with version 5.0.0) by popping up a context menu:

Play Music app with context menu open in one song

I prefer the look of these dots over the old triangle that looks like a counter. I know that it should not be so difficult to implement from scratch, my question is:

Is there any new standard way to implement this template (like the new navigation box template in the upper left)?

Thanks in advance.

+4
source share
3 answers

To display a popup list from a menu resource, use PopupMenu , (or PopupMenuCompat for APIs below 11).

For a more complex list, in which you yourself specify the adapter, use the ListPopupWindow (or the ListPopupWindowCompat API below 11).

+9
source

This is ListPopupMenu , basically all you have to do is create an image with this drawing and call ListPopupMenu on the image click

+1
source

This is just a custom counter with a 3-point image in the getView function and options in getDropdownView for the custom spinner adapter

0
source

Source: https://habr.com/ru/post/1482607/


All Articles