MCPcopy
hub / github.com/xxv/android-lifecycle

github.com/xxv/android-lifecycle @v0.9.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.9.0 ↗
81 symbols 219 edges 5 files 3 documented · 4%
README

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.

A Complete Android Fragment & Activity Lifecycle

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.

This diagram was originally created in Dia and has been rendered to PNG via Inkscape.

Core symbols most depended-on inside this repo

recLifeCycle
called by 148
tools/LifecycleLog/src/com/example/lifecyclelog/Util.java
onCreate
called by 0
tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java
onCreateOptionsMenu
called by 0
tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java
onActivityResult
called by 0
tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java
onAttachedToWindow
called by 0
tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java
onAttachFragment
called by 0
tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java
onConfigurationChanged
called by 0
tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java
onContentChanged
called by 0
tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java

Shape

Method 76
Class 5

Languages

Java100%

Modules by API surface

tools/LifecycleLog/src/com/example/lifecyclelog/MainFragmentActivity.java22 symbols
tools/LifecycleLog/src/com/example/lifecyclelog/MainActivity.java21 symbols
tools/LifecycleLog/src/com/example/lifecyclelog/TestFragment.java18 symbols
tools/LifecycleLog/src/com/example/lifecyclelog/TestCompatFragment.java18 symbols
tools/LifecycleLog/src/com/example/lifecyclelog/Util.java2 symbols

For agents

$ claude mcp add android-lifecycle \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact