Issue
I'm looking for a method in the Fragment Lifecycle, but I'm not sure which one.
Here's my situation: I've got a Fragment inside a ViewPager. The Fragment displays a List with some information. I fill the list in the Fragment's onCreateView()
. When the user opens a different Activity (settings in this case) and changes some settings, the information that the List in the Fragment has to show, changes. When the user returns to the Fragment using the Back-button, the onCreateView()
isn't re-called, so the information in the List isn't updated.
My question is: The onCreateView()
-method isn't called when the user returns to the fragment form a different Activity, but which method is called here? I need to know this because then I can fill the List in that method.
Thanks in advance!
Solution
onResume()
is the simple answer, called when user comes back. for more details refer lifecycle here FragmentLifecycle
Answered By - DjHacktorReborn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.