When activity is moved to stopped state, then what will happen to the life cycle of a fragment which is in that activity?
fragments life cycle is not dependent on activity's. So there won't be any effect for fragment life cycle.
Option 1 is true because fragments are independent modules designed for better space usage
fragments will be moved to onStop
both fragments will be destroyed and recreated when activity reaches onResume again.
Since fragments are part of an Activity always, when Activity is moved to stopped state, then automatically fragments in it will be moved to stopped state.
Note: Fragments life cycle will be affected by activity's life cycle.
Back To Top