Code example for ContextMenu

Methods: addgetItem

	OnCreateContextMenuListener create_cmenu_loc(final long rowid, final Location loc){
		OnCreateContextMenuListener cmenu_loc = new OnCreateContextMenuListener() {
			public void onCreateContextMenu(ContextMenu menu, View v,
					ContextMenuInfo menuInfo) {
				menu.add("elimina posizione");
				menu.getItem(0).setOnMenuItemClickListener(new OnMenuItemClickListener() {
					public boolean onMenuItemClick(MenuItem item) {
						deleteLocation(rowid, loc);
						return true; 
		return cmenu_loc;
	protected void callTextEditor(){ 
		Intent i = new Intent();
Connect your IDE to all the code out there  Get Codota for Java