In one Android activity I have added a context menu to an ImageView with only one menu item: ‘Close’ (in order to hide the image).
However, the context menu does not look precisely nice when shown, expanding a big white rectangle occupying almost all the wide of the screen. Is there a way to reduce the size of this rectangle to cover only the word ‘Close’?. This is my main question, but any pointer to how to change other styles of the context menu will be appreciated (e.g., the background color, or the text font/color). Thanks !
In one Android activity I have added a context menu to an ImageView with
Share
I don’t think it’s possible to set the menu item width.
However, you can find a great article here that shows how to customize the look of your menu item.