很久没有写东西了,今天来公司比较早,弄个小知识,了解View的动作,才能让它有更大的作为

View 的创建 

setOverScrollMode()setLayoutParams()requestLayout()hasFocus()hasTransientState()isClickable()isLongClickable()getAccessibilityNodeProvider()dispatchVisibilityChanged()onVisibilityChanged()dispatchVisibilityChanged()onVisibilityChanged()jumpDrawablesToCurrentState()jumpDrawablesToCurrentState()jumpDrawablesToCurrentState()onAttachedToWindow()jumpDrawablesToCurrentState()isFocused()onWindowVisibilityChanged()refreshDrawableState()drawableStateChanged()getVisibility()getLayoutParams()onMeasure()getSuggestedMinimumWidth()getSuggestedMinimumHeight()getLayoutParams()getVisibility()getLayoutParams()layout()isOpaque()onSizeChanged()isOpaque()getMatrix()isOpaque()onLayout()requestFocus()forceLayout()dispatchWindowFocusChanged()onWindowFocusChanged()refreshDrawableState() drawableStateChanged()getVisibility()getLayoutParams()onMeasure()getSuggestedMinimumWidth()getSuggestedMinimumHeight()getLayoutParams()getVisibility()getLayoutParams()layout()onLayout()getLayerType()getAnimation()getLayerType()computeScroll()draw()onDraw()dispatchDraw()hasOverlappingRendering()

点击View方法执行顺序

dispatchTouchEvent()onFilterTouchEventForSecurity()onTouchEvent()

下拉状态栏,会执行下面方法。
 

dispatchWindowFocusChanged()onWindowFocusChanged()isPressed()isPressed()refreshDrawableState()drawableStateChanged()


返回键退出状态栏
 

dispatchWindowFocusChanged()onWindowFocusChanged()refreshDrawableState()drawableStateChanged()


锁屏

onScreenStateChanged()dispatchSaveInstanceState()

解屏
 

onScreenStateChanged()


旋转

dispatchSaveInstanceState()onWindowVisibilityChanged()onDetachedFromWindow()destroyDrawingCache()setOverScrollMode()setLayoutParams()requestLayout()hasFocus()hasTransientState()isClickable()isLongClickable()getAccessibilityNodeProvider()dispatchRestoreInstanceState()dispatchVisibilityChanged()onVisibilityChanged()dispatchVisibilityChanged()onVisibilityChanged()jumpDrawablesToCurrentState()jumpDrawablesToCurrentState()jumpDrawablesToCurrentState()onAttachedToWindow()jumpDrawablesToCurrentState()isFocused()onWindowVisibilityChanged()refreshDrawableState()drawableStateChanged()getVisibility()getLayoutParams()onMeasure()getSuggestedMinimumWidth()getSuggestedMinimumHeight()getLayoutParams()getVisibility()getLayoutParams()layout()isOpaque()onSizeChanged()isOpaque()getMatrix()isOpaque()onLayout()requestFocus()forceLayout()dispatchWindowFocusChanged()onWindowFocusChanged()refreshDrawableState()drawableStateChanged()getVisibility()getLayoutParams()onMeasure()getSuggestedMinimumWidth()getSuggestedMinimumHeight()getLayoutParams()getVisibility()getLayoutParams()layout()onLayout()getLayerType()getAnimation()getLayerType()computeScroll()draw()onDraw()dispatchDraw()hasOverlappingRendering()

退出
 

dispatchWindowFocusChanged()onWindowFocusChanged()isPressed()isPressed()refreshDrawableState()drawableStateChanged()dispatchWindowVisibilityChanged()onWindowVisibilityChanged()onDetachedFromWindow()destroyDrawingCache()

 

更多相关文章

  1. android native jni 代码
  2. Android(安卓)Java笔试题(带大部分答案)
  3. android 拍照或从相册获取图片 返回 bitmap
  4. Android基于ViewPager+Fragment实现左右滑屏效果的方法
  5. Android细节问题总结(二)
  6. android调用matlab中的函数方法
  7. Android媒体扫描代码分析
  8. Android中banner的使用步骤
  9. Android(安卓)中Edittext设置不弹出软键盘

随机推荐

  1. androidUI设计之旅 ----布局文件属性解析
  2. Android的通知栏点击后无反应解决办法
  3. Android(安卓)调试桥
  4. Windows环境下Android(安卓)Studio系列3
  5. Android缩放图片Bitmap、Drawable
  6. Android(安卓)乱七八糟
  7. android progressbar 显示两个进度样式的
  8. 解决Android中No resource found that ma
  9. Android(安卓)EditText 多行,滚动条 等
  10. Android(安卓)UI布局中设置了fill_parene