我们都知道Android Activity的生命周期和Fragment的生命周期。但是视图有什么等效的东西吗?
例如,这可以帮助建立自定义视图或深入了解Android上非常常见且经常隐藏的图形操作。
提前致谢 !
我们都知道Android Activity的生命周期和Fragment的生命周期。但是视图有什么等效的东西吗?
例如,这可以帮助建立自定义视图或深入了解Android上非常常见且经常隐藏的图形操作。
提前致谢 !
Answers:
这不是一个正式文件,但这个最近想出了在Google+上。这些评论也进行了很好的讨论,并提供了一些详细的解释。
onSaveInstanceState / onRestoreInstanceState
呢
在这里,我创建了扩展视图的自定义视图。然后在每种方法中写入日志。的调用的方法这里的顺序:
当运行调试
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
被示
onVisibilityAggregated
refreshDrawableState
drawableStateChanged
onCreateDrawableState
isFocused
hasWindowFocus
getVisibility
onMeasure
getSuggestedMinimumWidth
getSuggestedMinimumHeight
getVisibility
getVisibility
onMeasure
getSuggestedMinimumWidth
getSuggestedMinimumHeight
getVisibility
getVisibility
布局
isOpaque
onSizeChanged
的getBackground
isOpaque
getMatrix
isOpaque
isHardwareAccelerated
GETZ
getElevation
getTranslationZ
onLayout
getVisibility
getAnimation
getLayerType
getLayerType
computeScroll
得出
的onDraw
dispatchDraw
onDrawForeground
hasOverlappingRendering
dispatchWindowFocusChanged
onWindowFocusChanged
refreshDrawableState
drawableStateChanged
onCreateDrawableState
isFocused
hasWindowFocus
使用以下视图打开活动:
onScreenStateChanged
getLayoutDirection
getAnimation
getLayerType
getVisibility
getVisibility
getVisibility
布局
getVisibility
dispatchWindowFocusChanged
onWindowFocusChanged
refreshDrawableState
drawableStateChanged
onCreateDrawableState
isFocused
hasWindowFocus