Is there any graphical representation of Android views lifecycle (a state diagram)?

AndroidViewLifecycleRepresentation

Android Problem Overview


We all know about the Android Activity's life cycle and Fragment's life cycles. But is there anything equivalent for views ?

This could help, for instance, building custom views or give an in-depth look at a very common and often hidden graphic operation on Android.

Thanks in advance !

Android Solutions


Solution 1 - Android

It isn't an official document, but this recently came up on Google+. The comments also have a good discussion with some detailed explanation.

Solution 2 - Android

Here I created custom view that extends View. Then wrote logs in each method. Here the order of called methods:
When run debugging
setOverScrollMode
setOverScrollMode
onFinishInflate
setLayoutParams
getLayoutDirection
requestLayout
hasFocus
hasTransientState
getVisibility
getLayoutDirection
getLayoutDirection
canResolveLayoutDirection
getLayoutDirection
canResolveTextDirection
isLayoutDirectionResolved
isLayoutDirectionResolved
getLayoutDirection
getLayoutDirection
isLayoutDirectionResolved
isTextDirectionResolved
isTextAlignmentResolved
getLayoutDirection
jumpDrawablesToCurrentState
jumpDrawablesToCurrentState
jumpDrawablesToCurrentState
jumpDrawablesToCurrentState
jumpDrawablesToCurrentState
jumpDrawablesToCurrentState
getVisibility
onAttachedToWindow
jumpDrawablesToCurrentState
getBackground
isFocused
isShown
onVisibilityAggregated
refreshDrawableState
drawableStateChanged
onCreateDrawableState
isFocused
hasWindowFocus
getVisibility
onMeasure
getSuggestedMinimumWidth
getSuggestedMinimumHeight
getVisibility
getVisibility
onMeasure
getSuggestedMinimumWidth
getSuggestedMinimumHeight
getVisibility
getVisibility
layout
isOpaque
onSizeChanged
getBackground
isOpaque
getMatrix
isOpaque
isHardwareAccelerated
getZ
getElevation
getTranslationZ
onLayout
getVisibility
getAnimation
getLayerType
getLayerType
computeScroll
draw
onDraw
dispatchDraw
onDrawForeground
hasOverlappingRendering
dispatchWindowFocusChanged
onWindowFocusChanged
refreshDrawableState
drawableStateChanged
onCreateDrawableState
isFocused
hasWindowFocus

Opening activity with this view:
onScreenStateChanged
getLayoutDirection
getAnimation
getLayerType
getVisibility
getVisibility
getVisibility
layout
getVisibility
dispatchWindowFocusChanged
onWindowFocusChanged
refreshDrawableState
drawableStateChanged
onCreateDrawableState
isFocused
hasWindowFocus

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSnicolasView Question on Stackoverflow
Solution 1 - AndroidRaghav SoodView Answer on Stackoverflow
Solution 2 - AndroidEvgenii VorobeiView Answer on Stackoverflow