Code example for ListFragment

Methods: getActivity, onActivityResult

0
		mActivatedPosition = position;
	} 
	 
	@Override 
	public void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		switch (requestCode) {
		case DIALOG_REQUEST:
			if (resultCode == Activity.RESULT_OK) {
				cursorAdapter.changeCursor(DatabaseHelper.getInstance(getActivity()).getExercises(getWorkoutId()));
			} 
			break; 
		} 
	} 
 
	public void setWorkoutId(long workoutId) {
		this.workoutId = workoutId;
	} 
	public long getWorkoutId() { 
		if (workoutId == 0) {
			workoutId = ((ExerciseListActivity)getActivity()).getIntent().getLongExtra(WorkoutFragment.WORKOUT_ID, 0);