当前位置: 首页 > news >正文

江西那家做网站公司好服装市场调研报告范文

江西那家做网站公司好,服装市场调研报告范文,军事新闻最新消息今天报道,广东省中山市网站窗口在App端是以PhoneWindow的形式存在,承载了一个Activity的View层级结构。这里我们探讨一下WMS端窗口的形式。 可以通过adb shell dumpsys activity containers 来看窗口显示的层级 窗口容器类 —— WindowContainer类 /*** Defines common functionality for c…

窗口在App端是以PhoneWindow的形式存在,承载了一个Activity的View层级结构。这里我们探讨一下WMS端窗口的形式。
可以通过adb shell dumpsys activity containers 来看窗口显示的层级

窗口容器类 —— WindowContainer类

/*** Defines common functionality for classes that can hold windows directly or through their* children in a hierarchy form.* The test class is {@link WindowContainerTests} which must be kept up-to-date and ran anytime* changes are made to this class.*/
class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<E>implements Comparable<WindowContainer>, Animatable, SurfaceFreezer.Freezable,InsetsControlTarget {....../*** The parent of this window container.* For removing or setting new parent {@link #setParent} should be used, because it also* performs configuration updates based on new parent's settings.*/private WindowContainer<WindowContainer> mParent = null;......// List of children for this window container. List is in z-order as the children appear on// screen with the top-most window container at the tail of the list.protected final WindowList<E> mChildren = new WindowList<E>();

WindowContainer注释中开头就说明了其作用,即给可以直接持有窗口的自己或它的孩子定义了一些公共的方法和属性。
WindowContainer定义了能够直接或者间接以层级结构的形式持有窗口的类的通用功能。
从类的定义和名称,可以看到WindowContainer是一个容器类,可以容纳WindowContainer及其子类对象。如果另外一个容器类作为WindowState的容器,那么这个容器类需要继承WindowContainer或其子类。

其中mParent和mChildren,一个代表父节点一个代表子节点,而且子节点的list顺序代表就是z轴的层级显示顺序,list尾巴在比list的头的z轴层级要高。
1)mParent是WindowContainer类型成员变量,保存的是当前WindowContainer的父容器的引用。
2)mChildren是WindowList类型的成员变量,保存的则是当前WindowContainer持有的所有子容器。并且列表的顺序也就是子容器出现在屏幕上的顺序,最顶层的子容器位于队尾。

根窗口容器 —— RootWindowContainer

/** Root {@link WindowContainer} for the device. */
public class RootWindowContainer extends WindowContainer<DisplayContent>

根窗口容器,树的根是它。通过它遍历寻找,可以找到窗口树上的窗口。它的孩子是DisplayContent。

屏幕 —— DisplayContent

/*** Utility class for keeping track of the WindowStates and other pertinent contents of a* particular Display.*/
class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.DisplayContentInfo {

该类是对应着显示屏幕的,Android是支持多屏幕的,所以可能存在多个DisplayContent对象。上图只画了一个对象的结构,其他对象的结构也是和画的对象的结构是相似的。


RootWindowContainer代表dumpsys containers中ROOT ,DisplayContentdumpsys containers中Display ,0表示当前显示的屏幕
在这里插入图片描述


窗口 —— WindowState类

/** A window in the window manager. */
class WindowState extends WindowContainer<WindowState> implements WindowManagerPolicy.WindowState,InsetsControlTarget, InputTarget {

在WMS窗口体系中,一个WindowState对象就代表了一个窗口,其继承WindowContainer,这就说明WindowState同样可以作为其他窗口的父容器,例如我们常见的PopupWindow

WindowState的容器

可直接持有WindowState的容器即WindowToken和ActivityRecord

WindowToken类

/*** Container of a set of related windows in the window manager. Often this is an AppWindowToken,* which is the handle for an Activity that it uses to display windows. For nested windows, there is* a WindowToken created for the parent window to manage its children.*/
class WindowToken extends WindowContainer<WindowState> {

这个注释的意思大概是说:窗口管理器中一组相关窗口的容器。这通常是一个AppWindowToken,它是用于显示窗口的“活动”的句柄。对于嵌套窗口,会为父窗口创建一个WindowToken来管理其子窗口。
总而言之就是用WindowToken来管理WindowState

ActivityRecord类

/*** An entry in the history task, representing an activity.*/
public final class ActivityRecord extends WindowToken implements WindowManagerService.AppFreezeListener {

ActivityRecord是WindowToken的子类,在WMS中一个ActivityRecord对象就代表一个Activity对象

WallpaperWindowToken类

/*** A token that represents a set of wallpaper windows.*/
class WallpaperWindowToken extends WindowToken {

WallpaperWindowToken继承WindowToken,是用来存放和Wallpaper相关的窗口。


一般来说,一个窗口的父容器是WindowToken还是ActivityRecord,是否主动使用ViewManager.addView来添加一个窗口
父容器为WindowToken的情况:APP(含系统应用)主动调用添加窗口方法来添加窗口,如StatusBar、浮窗等。即非Activity窗口
父容器为ActivityRecord的情况:系统侧调用添加窗口方法来添加窗口,如在桌面启动一个应用等。即Activity窗口

从层级角度将窗口划分为:
App之上的窗口,父容器为WindowToken,如StatusBar和NavigationBar。
App窗口,父容器为ActivityRecord,如Launcher。
App之下的窗口,父容器为WallpaperWindowToken,如ImageWallpaper窗口


WindowToken的容器 —— DisplayArea.Tokens

    /*** DisplayArea that contains WindowTokens, and orders them according to their type.*/public static class Tokens extends DisplayArea<WindowToken> {

包含WindowTokens的容器Tokens,并根据其类型对其进行排序。

ActivityRecord的容器 —— Task

/*** {@link Task} is a TaskFragment that can contain a group of activities to perform a certain job.* Activities of the same task affinities usually group in the same {@link Task}. A {@link Task}* can also be an entity that showing in the Recents Screen for a job that user interacted with.* A {@link Task} can also contain other {@link Task}s.*/
class Task extends TaskFragment {

Task继承TaskFragment,它的孩子可以是Task,也可以是ActivityRecord类型。是一个TaskFragment,它可以包含一组执行特定作业的Activity。具有相同任务相似性的Activity通常在同一任务中分组。任务也可以是显示在用户交互的作业的最近屏幕中的实体。任务还可以包含其他任务。

/*** A basic container that can be used to contain activities or other {@link TaskFragment}, which* also able to manage the activity lifecycle and updates the visibilities of the activities in it.*/
class TaskFragment extends WindowContainer<WindowContainer> {

一个基本容器,可用于包含Activity或其他TaskFragment,它还能够管理Activity生命周期并更新其中活动的可见性。

Task的容器 —— TaskDisplayArea

/*** {@link DisplayArea} that represents a section of a screen that contains app window containers.** The children can be either {@link Task} or {@link TaskDisplayArea}.*/
final class TaskDisplayArea extends DisplayArea<WindowContainer> {

TaskDisplayArea,代表了屏幕上一块专门用来存放App窗口的区域。
它的子容器可能是Task或者是TaskDisplayArea。

DisplayArea类

/*** Container for grouping WindowContainer below DisplayContent.** DisplayAreas are managed by a {@link DisplayAreaPolicy}, and can override configurations and* can be leashed.** DisplayAreas can contain nested DisplayAreas.** DisplayAreas come in three flavors, to ensure that windows have the right Z-Order:* - BELOW_TASKS: Can only contain BELOW_TASK DisplayAreas and WindowTokens that go below tasks.* - ABOVE_TASKS: Can only contain ABOVE_TASK DisplayAreas and WindowTokens that go above tasks.* - ANY: Can contain any kind of DisplayArea, and any kind of WindowToken or the Task container.** @param <T> type of the children of the DisplayArea.*/
public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> {

用于将WindowContainer分组到DisplayContent下方的容器。
DisplayArea由{@link DisplayAreaPolicy}管理,能够复写Configuration和被绑定到leash上。
DisplayArea可以包含嵌套的DisplayArea。
DisplayAreas有三种风格,以确保窗口具有正确的Z顺序:

  • BELOW_TASKS:只能包含位于任务下方的BELLOW_TASK显示区域和WindowToken。
  • ABOVE_TASKS:只能包含位于任务上方的ABOVE_TASK显示区域和WindowToken。
  • ANY:可以包含任何类型的DisplayArea,以及任何类型的WindowToken或Task容器。

@param<T>DisplayArea的子项的类型。

DisplayArea有三个直接子类,TaskDisplayArea,DisplayArea.Tokens和DisplayArea.Tokens

Task的容器 —— TaskDisplayArea

/*** {@link DisplayArea} that represents a section of a screen that contains app window containers.** The children can be either {@link Task} or {@link TaskDisplayArea}.*/
final class TaskDisplayArea extends DisplayArea<WindowContainer> {

TaskDisplayArea为DisplayContent的孩子,对应着窗口层次的第2层。第2层作为应用层,看它的定义:int APPLICATION_LAYER = 2,应用层的窗口是处于第2层。
TaskDisplayArea代表了屏幕上的一个包含App类型的WindowContainer的区域。它的子节点可以是Task,或者是TaskDisplayArea。

public DisplayAreaPolicy instantiate(WindowManagerService wmService,DisplayContent content, RootDisplayArea root,DisplayArea.Tokens imeContainer) {Inject.ResultOne<TaskDisplayArea> result = new Inject.ResultOne<>(new TaskDisplayArea(content, wmService,"DefaultTaskDisplayArea", FEATURE_DEFAULT_TASK_CONTAINER));

在DisplayAreaPolicy.java中有创建,并更名为DefaultTaskDisplayArea

WindowTokens的容器 —— DisplayArea.Tokens

    /*** DisplayArea that contains WindowTokens, and orders them according to their type.*/public static class Tokens extends DisplayArea<WindowToken> {

Tokens为DisplayArea的内部类,且继承DisplayArea。
即Tokens代表专门包含WindowTokens的容器,它的孩子是WindowToken,而WindowToken的孩子则为WindowState对象。WindowState是对应着一个窗口的。

输入法的容器 —— ImeContainer

    /*** Container for IME windows.** This has some special behaviors:* - layers assignment is ignored except if setNeedsLayer() has been called before (and no*   layer has been assigned since), to facilitate assigning the layer from the IME target, or*   fall back if there is no target.* - the container doesn't always participate in window traversal, according to*   {@link #skipImeWindowsDuringTraversal()}*/private static class ImeContainer extends DisplayArea.Tokens {

ImeContainer为DisplayContent.java的内部类,且继承DisplayArea.Tokens,即同样是一个WindowToken的容器,它的孩子是WindowToken类型。WindowToken的孩子为WindowState类型,而WindowState类型则对应着输入法窗口。

模糊效果 —— DisplayArea.Dimmable

    /*** DisplayArea that can be dimmed.*/static class Dimmable extends DisplayArea<DisplayArea> {private final Dimmer mDimmer = new Dimmer(this);

Dimmable也是DisplayArea的内部类,从名字可以看出,这类的DisplayArea可以添加模糊效果,并且Dimmable也是一个DisplayArea类型的DisplayArea容器。
可以通过Dimmer对象mDimmer施加模糊效果,模糊图层可以插入到以该Dimmable对象为根节点的层级结构之下的任意两个图层之间。
且它有一个直接子类,RootDisplayArea。

DisplayArea层级结构的根节点 —— RootDisplayArea

/*** Root of a {@link DisplayArea} hierarchy. It can be either the {@link DisplayContent} as the root* of the whole logical display, or a {@link DisplayAreaGroup} as the root of a partition of the* logical display.*/
class RootDisplayArea extends DisplayArea.Dimmable {

{@link DisplayArea}层次结构的根。它可以是作为整个逻辑显示的根的{@link DisplayContent},也可以是作为逻辑显示的分区的根的{@link DisplayAreaGroup}。
即:
DisplayContent,作为整个屏幕的DisplayArea层级结构根节点。
DisplayAreaGroup,作为屏幕上部分区域对应的DisplayArea层级结构的根节点

屏幕 —— DisplayContent


/*** Utility class for keeping track of the WindowStates and other pertinent contents of a* particular Display.*/
class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.DisplayContentInfo {

用于跟踪特定显示器的WindowStates和其他相关内容的实用程序类,总而言之就是代表一个屏幕。
隶属于同一个DisplayContent的窗口将会被显示在同一个屏幕中。每一个DisplayContent都对应着唯一ID

DisplayAreaGroup

/** The root of a partition of the logical display. */
class DisplayAreaGroup extends RootDisplayArea {

逻辑显示分区的根


文章转载自:
http://dinncotoxicomania.wbqt.cn
http://dinncocarcinosarcoma.wbqt.cn
http://dinncocantilever.wbqt.cn
http://dinncobarmecidal.wbqt.cn
http://dinncodisturbance.wbqt.cn
http://dinncotiled.wbqt.cn
http://dinncophloroglucinol.wbqt.cn
http://dinncowhalemeat.wbqt.cn
http://dinncointerleaf.wbqt.cn
http://dinncounhinge.wbqt.cn
http://dinncogunn.wbqt.cn
http://dinncopyramidic.wbqt.cn
http://dinncocomeliness.wbqt.cn
http://dinncoureter.wbqt.cn
http://dinncocomus.wbqt.cn
http://dinncoeaux.wbqt.cn
http://dinncosawdust.wbqt.cn
http://dinncoearhole.wbqt.cn
http://dinncoseclusive.wbqt.cn
http://dinncoanisole.wbqt.cn
http://dinncomutant.wbqt.cn
http://dinncobriskly.wbqt.cn
http://dinncoiced.wbqt.cn
http://dinncokomi.wbqt.cn
http://dinncolender.wbqt.cn
http://dinncodrugmaker.wbqt.cn
http://dinncochickling.wbqt.cn
http://dinncounillusioned.wbqt.cn
http://dinncotessie.wbqt.cn
http://dinncoargentate.wbqt.cn
http://dinncounremember.wbqt.cn
http://dinncorevision.wbqt.cn
http://dinncoslinkweed.wbqt.cn
http://dinncolarkishly.wbqt.cn
http://dinncoperissodactyle.wbqt.cn
http://dinnconu.wbqt.cn
http://dinncochersonese.wbqt.cn
http://dinncomesomorphy.wbqt.cn
http://dinncofeast.wbqt.cn
http://dinncorupee.wbqt.cn
http://dinncoparatransit.wbqt.cn
http://dinncoantennate.wbqt.cn
http://dinncopoachy.wbqt.cn
http://dinncoiciness.wbqt.cn
http://dinncocharmian.wbqt.cn
http://dinncoprismy.wbqt.cn
http://dinncoadagio.wbqt.cn
http://dinncospatchcock.wbqt.cn
http://dinncomicrometry.wbqt.cn
http://dinncopunctuation.wbqt.cn
http://dinncolaudability.wbqt.cn
http://dinncoshorten.wbqt.cn
http://dinncovegetarian.wbqt.cn
http://dinncosilky.wbqt.cn
http://dinncomillier.wbqt.cn
http://dinncochatter.wbqt.cn
http://dinncocoddle.wbqt.cn
http://dinncogan.wbqt.cn
http://dinncokoord.wbqt.cn
http://dinncoovotestis.wbqt.cn
http://dinncotenuirostral.wbqt.cn
http://dinncohypochondriasis.wbqt.cn
http://dinncoprincipate.wbqt.cn
http://dinncogust.wbqt.cn
http://dinncoflitch.wbqt.cn
http://dinncolongish.wbqt.cn
http://dinncojuggernaut.wbqt.cn
http://dinncoplainclothesman.wbqt.cn
http://dinncoportentous.wbqt.cn
http://dinncophial.wbqt.cn
http://dinncolaxativeness.wbqt.cn
http://dinncobragi.wbqt.cn
http://dinncopentachlorophenol.wbqt.cn
http://dinncopointillism.wbqt.cn
http://dinncopopish.wbqt.cn
http://dinncomillrace.wbqt.cn
http://dinncocock.wbqt.cn
http://dinncodepressomotor.wbqt.cn
http://dinncokjv.wbqt.cn
http://dinncohoochie.wbqt.cn
http://dinncokishinev.wbqt.cn
http://dinncopergelisol.wbqt.cn
http://dinncofor.wbqt.cn
http://dinncodeafen.wbqt.cn
http://dinncocrosse.wbqt.cn
http://dinncorussenorsk.wbqt.cn
http://dinncojibboom.wbqt.cn
http://dinncoablatival.wbqt.cn
http://dinncoradiogoniometry.wbqt.cn
http://dinncocrawlway.wbqt.cn
http://dinncobandspreading.wbqt.cn
http://dinncohyperslow.wbqt.cn
http://dinncounpolished.wbqt.cn
http://dinncofrizzle.wbqt.cn
http://dinncohotel.wbqt.cn
http://dinncodexedrine.wbqt.cn
http://dinncolinoleate.wbqt.cn
http://dinncofathom.wbqt.cn
http://dinncoseclusively.wbqt.cn
http://dinncoupdraft.wbqt.cn
http://www.dinnco.com/news/161109.html

相关文章:

  • 烟台app开发公司朔州网站seo
  • 重庆深蓝科技网站开发微博营销策略
  • 怎么看别人网站在哪里做的外链微信小程序开发费用一览表
  • 如何做弹幕视频网站百度推广投诉人工电话
  • 如何优化网站郑州网络推广代理
  • 聊城集团网站建设免费的html网站
  • 绵阳网站开发公司网络视频营销
  • 如何上国外购物网站nba哈登最新消息
  • 360免费做网站谷歌浏览器下载官网
  • 大姚网站建设引流最好的推广方法
  • 网站排名优化外包网络营销策划目的
  • centos怎么做网站百度seo如何优化
  • 南通通州住房和城乡建设网站安徽网络seo
  • 仿win8网站模板seo关键词快速排名
  • 福州城市建设规划网站深圳网络营销策划公司
  • 网站主页和子页怎么做百度保障平台 客服
  • 网页设计制作音乐网站拉新推广怎么快速拉人
  • 网站建设款属不属于无形资产关键词排名点击器
  • iis默认网站建设中网络营销的未来发展趋势
  • 继续坚持网站建设监管佛山百度推广电话
  • 网站设计代做百度网站怎么申请注册
  • 金坛网站制作哈尔滨优化调整人员流动管理
  • 做画册找什么网站百度热搜广告设计公司
  • 济南免费网站制作河北seo网络优化培训
  • 在乐文网站做翻译靠谱吗国外网站建设
  • 福州网站建设H5百度 营销推广怎么做
  • 做网站找毛叶子歌推广怎么做才可以赚钱
  • 静态企业网站下载中央广播电视总台
  • 南昌制作网站软件长春seo排名收费
  • 现在有什么网站做设计或编程兼职正规赚佣金的平台