Code example for ListFragment

Methods: onListItemClick, getView, startActivity

0
		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());
    } 
 
    /* 
     * LoaderCallBack methods 
     */ 
 
    @Override 
    public Loader<Cursor> onCreateLoader(int id, Bundle arg) {
        CursorLoader cursorLoader = new CursorLoader(
        		getActivity(), EcardDao.ECARD_URI, null, "personal = ?", new String[]{isPersonal}, null);