Code example for MenuInflater

Methods: inflate

0
 
		@Override 
		public void inflate(final int menuRes, final Menu menu)
		{ 
			loadActionBarMetadata(menuRes);
			mInflater.inflate(menuRes, menu);
		} 
 
		/** 
		 * Loads action bar metadata from a menu resource, storing a list of menu item IDs that should be shown 
		 * on-screen (i.e. those with showAsAction set to always or ifRoom). 
		 *  
		 * @param menuResId 
		 *            Menu (by resource id) to parse for ActionBar metadata 
		 */ 
		@SuppressLint("InlinedApi") 
		private void loadActionBarMetadata(final int menuResId)
		{ 
			XmlResourceParser parser = null;
			try 
			{