How can I edit the dimensions of a PopUp Menu Item in Android?

偶尔善良 提交于 2019-12-07 05:39:41

问题


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

来源:https://stackoverflow.com/questions/12257769/how-can-i-edit-the-dimensions-of-a-popup-menu-item-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!