Code example for MenuItem

Methods: getGroupId

	 * @return true if the menu item is part of an exclusive group which was set to checkable using 
	 * setGroupCheckable() and false if the menu items is part of a group which need not be exclusive 
	 * and multiple items can have their checked state set to true. 
	public boolean isExclusiveItem(MenuItem item){
		int groupId = item.getGroupId();
		Boolean exclusive = exclusiveItemMap.get(groupId);
		if(exclusive == null){
			//if setCheckable() was set to true but setGroupCheckable() was not used 
			return false; 
			return exclusive;
	public void setGroupEnabled(int group, boolean enabled) {
		subMenu.setGroupEnabled(group, enabled);