Remove Popup Menu Item Programmatically
I'm inflating a popup menu in my application. I've created a popmenu xml like below. Song_popup xml
Solution 2:
You can do it simpily. ex-
if (popup != null && yourcondition){
MenuItem menuitem= popup.getMenu().getItem(1);
menuitem.setVisible(false);
}
Solution 3:
Unless I’m missing something, it should be as simple as e.g.:
if (doNotShowAddQueue) {
finalMenumenu= popup.getMenu();
menu.removeItem(R.id.add_queue);
}
Post a Comment for "Remove Popup Menu Item Programmatically"