Code example for MenuItem

Methods: getItemIdgetMenuInfo

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;
 
Experience pair programming with AI  Get Codota for Java