Code example for ContextMenu

Methods: add, setHeaderTitle

0
		listview.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {
 
			@Override 
			public void onCreateContextMenu(ContextMenu menu, View v,
					ContextMenuInfo menuInfo) {
				menu.setHeaderTitle("Hello");
				menu.add(0, 0, 0, "Item One");
				menu.add(0, 1, 0, "Item Two");
 
			} 
		}); 
	} 
 
	@Override 
	public boolean onContextItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case 0: 
			Toast.makeText(this, "Item One", Toast.LENGTH_SHORT).show();
			break; 
			 
		case 1: