Please enable JavaScript.
Coggle requires JavaScript to display documents.
Week 6: Fragment (Fragment (Fragment represent a behaviour or a portion of…
Week 6: Fragment
Fragment
-
-
-
Each individual fragment has its own lifecycle, receives its own input events
MUST always be hosted in an activity.
- Fragment's lifecycle is always affected by host activity's lifecycle.
- E.g., activity halted, fragment halted
When fragment is added into activity, it existed in the ViewGroup inside view's hierarchy.
-
-
-
Activity VS Fragment
Fragment provides a new way to flexibly displaying the UI/ performing some processes in modular manner, under single activity.
-
-
-