11

有人可以在下面详细解释一下,

1- What is the use of ActivityManager & WindowManager?
2- What is the difference between ActivityManager & WindowManager?
4

2 回答 2

21

窗口管理器:- 负责组织屏幕。它分配表面并决定它们(应用程序)的去向以及它们的分层方式。在为所有应用程序创建表面时,它们直接绘制到表面而不通过窗口管理器。

活动管理器:- 使用活动管理器,Android 系统管理处于不同状态(启动、运行、暂停、停止、销毁)的活动堆栈。

有关活动、窗口和表面的一些基本信息。

-An activity has one or more windows (e.g. dialogs)
-A window has one or more surfaces (e.g. surface views)
-However, in window manager, a window is called a session
-A surface is called a window
-And an activity becomes roughly a token

获取有关应用程序关键概念、活动和资源的信息,请查看此链接

于 2012-02-11T06:08:20.273 回答
0

class ActivityManager管理任务、堆栈、何时显示和隐藏Window内容、销毁。系统变化感知,此类提供有关活动、服务和包含过程的信息并与之交互。

ActvityManager属于android.app

管理屏幕、状态、堆栈和进程中的位置


interface WindowManager extends ViewManager WindowManagerImpl管理视图和表面本身,如果存在专利视图,将它们绑定到特定的应用程序Display

WindowManager属于android.view

管理视图,它是 x、y 和 z 轴和动画

GoogleIO17中的PS主题

于 2018-04-13T05:19:04.293 回答