我正在使用以下代码来显示弹出菜单
PopupMenu popupMenu = new PopupMenu(MainActivity.this, v);
popupMenu.getMenuInflater().inflate(R.menu.popupmenu, popupMenu.getMenu());
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
Toast.makeText(MainActivity.this,
item.toString(),
Toast.LENGTH_LONG).show();
return true;
}
});
popupMenu.show();
}
但是菜单覆盖了我的大部分屏幕区域。如何指定弹出菜单的大小?