Code example for ListFragment

Methods: onCreateContextMenu

	public void onCreateContextMenu(ContextMenu menu, View v,
	    ContextMenuInfo menuInfo) {
		super.onCreateContextMenu(menu, v, menuInfo);
		contextMenu.onCreateContextMenu(menu, v, menuInfo);
	public boolean onContextItemSelected(MenuItem item) {
		return contextMenu.onContextItemSelected(item);
    public void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
        Context context = getView().getContext().getApplicationContext();
        Cursor cursor = adapter.getCursor();
Connect your IDE to all the code out there  Get Codota for Java