android-activityfragmentandroid-lifecycleactivity-lifecyclefragment-lifecycle

Relation between fragment and activity lifecycle


I have an activity A , and there are 2 fragments associated with this activity, lets us call them F1 and F2. Now there is a fragment switch between these fragments, so in this case is the onResume() activity lifecycle event of activity A called ?


Solution

  • No. Activity's state will not change during a fragment transaction.