内容简介:After struggling with trying to figure out how various pieces fit together, I've done some research and put together the complete Android Activity/Fragment lifecycle chart. This has two parallel lifecycles (activities and fragments) which are organized ver
Complete Android Fragment & Activity Lifecycle
After struggling with trying to figure out how various pieces fit together, I've done some research and put together the complete Android Activity/Fragment lifecycle chart. This has two parallel lifecycles (activities and fragments) which are organized vertically by time. Lifecycle stages will occur in the vertical order in which they're displayed, across activities and fragments. In this way, you can see how your fragments interact with your activities.
If you see any discrepancies or errors in this diagram, please submit a pull request or contact steve@staticfree.info .
Vector versions suitable for printing: PDF or SVG
Some Notes
This intentionally leaves off user-triggered callbacks (such as onOptionsItemSelected() ), focusing on the lifecycle stages that are triggered by the system, in order to keep the diagram more focused on the parts that are hard to follow.
The canonical format of the diagram is the Dia file. It was then exported to SVG, hand-tweaked to fix font sizes, and imported into Inkscape to do an SVG, PDF, and PNG render. I hope to find a better workflow for this going forward; patches always welcome.
License
This diagram (in all its various forms and renders) is licensed under the Creative Commons BY-SA 4.0 license . If you would like it under a different Creative Commons license, please contact me and we can figure something out.
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。