Code example for MenuItem

Methods: getItemId, getMenuInfo

0
		} 
	} 
 
	public boolean onContextItemSelected(MenuItem item) {
		AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item
				.getMenuInfo();
		int menuItemIndex = item.getItemId();
		String menuItemName = MENU_ITEMS[menuItemIndex];
 
		if (menuItemName.equals("Delete")) {
			new DeleteMessageTask().execute(info.position);
		} 
 
		return true; 
	} 
 
	private class SetupAdapterTask extends AsyncTask<Void, Void, Void> {
 
		ProgressDialog dialog = null;
 
		protected void onPreExecute() {