Code example for ListFragment

Methods: onCreateContextMenu

0
    } 
     
    @Override 
	public void onCreateContextMenu(ContextMenu menu, View v,
	    ContextMenuInfo menuInfo) {
		super.onCreateContextMenu(menu, v, menuInfo);
		contextMenu.onCreateContextMenu(menu, v, menuInfo);
	} 
 
	@Override 
	public boolean onContextItemSelected(MenuItem item) {
		return contextMenu.onContextItemSelected(item);
	} 
 
    @Override 
    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();
        cursor.moveToPosition(position);
        startActivity(new EcardIntent(cursor, context).getIntent());