qmsggg_BlogCollect icon indicating copy to clipboard operation
qmsggg_BlogCollect copied to clipboard

Android组件管理框架:Android组件管理框架概述

Open qmsggg opened this issue 7 years ago • 0 comments

Android组件管理框架:Android组件管理框架概述

从这篇文章开始,我们正式开始去系统地分析Activity源码、原理、启动模式与启动流程等方面内容。这一系列文章可能是东半球最全面(捂脸:>逃~)的讲解Activity的文章。

继承体系

点击查看高清SVG大图

我们来介绍下上图中主要的类

  • Context:抽象类,应用的全局运行环境。
  • ContextWrapper:继承于Context,Context的代理类。ContextWrapper里的方法都最终调用Context里的方法来实现。
  • ContextThemeWrapper:继承于ContextWrapper,可以进行主题修改。
  • Activity:继承于ContextThemeWrapper,展示在用户面前的类,绘制UI,处理用户交互。
  • ActivityGroup:继承于Activity,一个屏幕可以包含多个Activity。

内部结构

我们再来看看在Activity提供各种功能的内部模块。

  • Instrumentation
  • IBinder
  • ActivityInfo
  • ActivityThread
  • SearchManager
  • Window
  • WindowManager

qmsggg avatar Mar 02 '18 20:03 qmsggg