Click here to Skip to main content
15,170,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello. My problem is that i don't understand something about Fragments' lifecycle. Fragments start by getting attached to Activities correct? But NewInstance() method is used to hit the window after Fragment's creation and before Fragment's attachment. Anyone care to enlighten me about this conflict?
Thanks in advance.

Further Explanation:
My question seems too vague in second reading. To clarify; on the various sources, it is advised to use NewInstance() method for a fragment to set arguments. NewInstance() provides the window between fragment's creation and attachment. My question is how fragment's creation comes before its attachment since it is supposed to be the exact opposite.
Posted
Updated 27-Apr-15 5:30am
v2
Comments
deepankarbhatnagar 27-Apr-15 3:47am
   
please explain

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900