Example usage for android.app Activity finishActivityFromChild

List of usage examples for android.app Activity finishActivityFromChild

Introduction

In this page you can find the example usage for android.app Activity finishActivityFromChild.

Prototype

public void finishActivityFromChild(@NonNull Activity child, int requestCode) 

Source Link

Document

This is called when a child activity of this one calls its finishActivity().

Usage

From source file:de.damdi.fitness.activity.create_workout.DialogWorkoutOverviewFragment.java

/**
 * Finishes the Activities ExerciseTypeDetailActivity and
 * ExerciseTypeListActivity .//ww w.  ja va 2  s  .co m
 */
private void finishActivities(Activity activity) {
    if (activity instanceof ExerciseTypeDetailActivity) {
        // finish ExerciseTypeDetailActivity AND
        // ExerciseTypeListActivity
        activity.finishActivityFromChild(getActivity(), ExerciseTypeListActivity.RESULT_WORKOUT);
        activity.finish();
    } else {
        // finish ExerciseTypeListActivity
        activity.finish();
    }
}