Issue
I looked at the source code of fragment (v4) http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/support/v4/app/Fragment.java#Fragment but i cannot figure out who is calling lifecycle methods? who is standing behind that? some object or method must explictly call onCreate, onCreatView etc...
Solution
Fragments share their lifecycle with their parent activity, which calls the lifecycle methods implicitly.
You can find the code here, with methods like dispatchActivityCreated, dispatchDestroy, etc.
Answered By - Simas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.