示例#1
0
		/// <summary>Adds an item to the menu.</summary>
		/// <remarks>Adds an item to the menu.  The other add methods funnel to this.</remarks>
		private android.view.MenuItem addInternal(int group, int id, int categoryOrder, java.lang.CharSequence
			 title)
		{
			int ordering = getOrdering(categoryOrder);
			[email protected] item = new [email protected]
				(this, group, id, categoryOrder, ordering, title, mDefaultShowAsAction);
			if (mCurrentMenuInfo != null)
			{
				// Pass along the current menu info
				item.setMenuInfo(mCurrentMenuInfo);
			}
			mItems.add(findInsertIndex(mItems, ordering), item);
			onItemsChanged(true);
			return item;
		}