- Notifications
You must be signed in to change notification settings - Fork677
A diagram of the Android Activity / Fragment lifecycle
xxv/android-lifecycle
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
After struggling with trying to figure out how various pieces fit together,I've done some research and put together the complete Android Activity/Fragmentlifecycle chart. This has two parallel lifecycles (activities and fragments)which are organized vertically by time. Lifecycle stages will occur in thevertical order in which they're displayed, across activities and fragments. Inthis way, you can see how your fragments interact with your activities.
If you see any discrepancies or errors in this diagram, please submit a pullrequest or contactsteve@staticfree.info.
Vector versions suitable for printing:PDF orSVG
Vector versions suitable for printingPDF2 orSVG2
This intentionally leaves off user-triggered callbacks (such asonOptionsItemSelected()
), focusing on the lifecycle stages that are triggeredby the system, in order to keep the diagram more focused on the parts that arehard to follow.
The canonical format of the diagram is theDia file. It was then exportedto SVG, hand-tweaked to fix font sizes, and imported intoInkscape to do anSVG, PDF, and PNG render. I hope to find a better workflow for this going forward;patches always welcome.
This diagram (in all its various forms and renders) is licensed under theCreative Commons BY-SA 4.0 license. If you would like it under adifferent Creative Commons license, please contact me and we can figuresomething out.
About
A diagram of the Android Activity / Fragment lifecycle