Popup menu with icons

from the CommonsWare Community archives

At August 24, 2019, 11:20am, rd7773 asked:

How to show popup menu with icons ? There are ways that involves calling a method ‘setForceShowIcons’ through reflection but i don’t think reflection is safe. Is there any other way or other approach to show similar popup menu with icons.

At August 24, 2019, 2:20pm, mmurphy replied:

There is no built-in option for this in the framework classes or AndroidX. Use ListPopupWindow and pass in a ListAdapter whose rows include icons.