Code example for ListFragment

Methods: onCreateContextMenu

0
	} 
 
	@Override 
	public void onCreateContextMenu(ContextMenu menu, View v,
			ContextMenuInfo menuInfo) {
		super.onCreateContextMenu(menu, v, menuInfo);
		    AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo;
		    if (v.getId() == android.R.id.list) {
		    	selectedUser = list.get(info.position);
		    } 
		menu.add("Delete");
		menu.add("Edit");
		menu.add("Export data to xml");
	} 
	 
	@Override 
	public boolean onContextItemSelected(MenuItem item) {
		if (item.getTitle().equals("Delete")) {
			// Delete user... 
			Log.i("FragmentList", "Need to delete user...");
			if(dbHandler.deleteUser(selectedUser)) {