Code example for MenuInflater

Methods: inflate

0
	public void inflate(int menuId) {
		// done without using the PopupMenu.inflate() method, which isn't available on Honeycomb. 
		// this method works on both Honeycomb and Ice Cream Sandwich. 
		MenuInflater inflater = menu.getMenuInflater();
		Menu baseMenu = menu.getMenu();
		inflater.inflate(menuId, baseMenu);
	} 
	 
	public void show() { 
		menu.show();
	} 
	 
	static { 
		try { 
			Class.forName("android.widget.PopupMenu");
		} catch (Exception ex) {
			throw new RuntimeException(ex);
		} 
	} 
	 
	public static void checkAvailable() {}