faloblack.blogg.se

Android studio fragment lifecycle
Android studio fragment lifecycle




android studio fragment lifecycle

When i run it, i expect another behavior. Like situation 1, but now Fragment and Activity loaded and i pressed Home:

android studio fragment lifecycle

But what is 8? When i load Fragment(since 3), Activity is never on foreground. Ok, i can understand: 9 is about Fragment came to the foreground, take focus and onResume was called. It seems like some kind of "switch focus" between Fragment and Activity. When app started, Fragment become active and user see only Fragment.ġ) There is no onResume between 2 - 3, because of Activity lose focus?Ģ) I don't think i understand what happen on 8 - 9. One launcher Activity with one Fragment, which filled it. I need you help to understand some points. I trace lifecycle method's callback from Activity and Fragment components and i have a lot of questions.






Android studio fragment lifecycle