How can I edit the dimensions of a PopUp Menu Item

2019-05-03 10:44发布

问题:

I have a PopUp Menu that drops down when I click a button. However I feel the items in this menu don't look good with respect to the overall view of my App. I was wondering if I could edit the dimensions of the items in the Menu. Maybe make the height of each item shorter, if possible.

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();