How to resize popup menu item in Android?

I have a PopUp menu that crashes when I press a button. However, I feel that the items in this menu do not look very good with regard to the general appearance of my application. I was wondering if I can edit the sizes of elements in the menu. Perhaps, if possible, make the height of each element shorter.

PopupMenu popup = new PopupMenu(this, settingsButton);
MenuInflater inflater = popup.getMenuInflater();
inflater.inflate(R.menu.settings_menu, popup.getMenu());

Then in the onClick () method of the button, I call show ()

popup.show();
+5
source share

All Articles