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 ?
Asked
Active
Viewed 35 times
1 Answers
0
No. Activity's state will not change during a fragment transaction.

just
- 1,900
- 4
- 25
- 46
-
So if the activity was in onResume() state and after fragment switch there won't be a call to onResume() for activity again? Instead will it remain in onResume() as it was ? – Aabhas Gupta Dec 24 '19 at 09:54
-
Activity is independent from Fragment. Fragment's lifecycle depends on Activity's lifecycle. – just Dec 24 '19 at 09:59
-
So this means again onResume() won't be called ? – Aabhas Gupta Dec 24 '19 at 10:16