/** * Start of window types that represent normal application windows. * 第一个应用窗口 */ publicstaticfinalintFIRST_APPLICATION_WINDOW=1;
/** * Window type: an application window that serves as the "base" window * of the overall application; all other application windows will * appear on top of it. * In multiuser systems shows only on the owning user's window. * 所有程序窗口的base窗口,其他应用程序窗口都显示在它上面 */ publicstaticfinalintTYPE_BASE_APPLICATION=1;
/** * Window type: a normal application window. The {@link #token} must be * an Activity token identifying who the window belongs to. * In multiuser systems shows only on the owning user's window. * 所有程序窗口的Base窗口,只能配合Activity在当前App使用 */ publicstaticfinalintTYPE_APPLICATION=2;
/** * Window type: special application window that is displayed while the * application is starting. Not for use by applications themselves; * this is used by the system to display something until the * application can show its own windows. * In multiuser systems shows on all users' windows. * 目标应用窗口未启动之前的那个窗口 */ publicstaticfinalintTYPE_APPLICATION_STARTING=3;
/** * Window type: a variation on TYPE_APPLICATION that ensures the window * manager will wait for this window to be drawn before the app is shown. * In multiuser systems shows only on the owning user's window. */ publicstaticfinalintTYPE_DRAWN_APPLICATION=4;
/** * End of types of application windows. * 最后一个应用窗口 */ publicstaticfinalintLAST_APPLICATION_WINDOW=99;
/** * Start of types of sub-windows. The {@link #token} of these windows * must be set to the window they are attached to. These types of * windows are kept next to their attached window in Z-order, and their * coordinate space is relative to their attached window. * 第一个子窗口 */ publicstaticfinalintFIRST_SUB_WINDOW=1000;
/** * Window type: a panel on top of an application window. These windows * appear on top of their attached window. * 面板窗口,显示于宿主窗口的上层,只能配合Activity在当前App使用 */ publicstaticfinalintTYPE_APPLICATION_PANEL= FIRST_SUB_WINDOW;
/** * Window type: window for showing media (such as video). These windows * are displayed behind their attached window. * 媒体窗口(如视频),显示于宿主窗口下层 */ publicstaticfinalintTYPE_APPLICATION_MEDIA= FIRST_SUB_WINDOW + 1;
/** * Window type: a sub-panel on top of an application window. These * windows are displayed on top their attached window and any * {@link #TYPE_APPLICATION_PANEL} panels. * 应用程序窗口的子面板,只能配合Activity在当前APP使用(PopupWindow默认就是这个Type) */ publicstaticfinalintTYPE_APPLICATION_SUB_PANEL= FIRST_SUB_WINDOW + 2;
/** Window type: like {@link #TYPE_APPLICATION_PANEL}, but layout * of the window happens as that of a top-level window, <em>not</em> * as a child of its container. * 对话框窗口,只能配合Activity在当前APP使用 */ publicstaticfinalintTYPE_APPLICATION_ATTACHED_DIALOG= FIRST_SUB_WINDOW + 3;
/** * Window type: window for showing overlays on top of media windows. * These windows are displayed between TYPE_APPLICATION_MEDIA and the * application window. They should be translucent to be useful. This * is a big ugly hack so: * @hide */ @UnsupportedAppUsage publicstaticfinalintTYPE_APPLICATION_MEDIA_OVERLAY= FIRST_SUB_WINDOW + 4;
/** * Window type: a above sub-panel on top of an application window and it's * sub-panel windows. These windows are displayed on top of their attached window * and any {@link #TYPE_APPLICATION_SUB_PANEL} panels. * @hide */ publicstaticfinalintTYPE_APPLICATION_ABOVE_SUB_PANEL= FIRST_SUB_WINDOW + 5;
/** * End of types of sub-windows. * 最后一个子窗口 */ publicstaticfinalintLAST_SUB_WINDOW=1999;
/** * Start of system-specific window types. These are not normally * created by applications. * 系统窗口,非应用程序创建 */ publicstaticfinalintFIRST_SYSTEM_WINDOW=2000;
/** * Window type: the status bar. There can be only one status bar * window; it is placed at the top of the screen, and all other * windows are shifted down so they are below it. * In multiuser systems shows on all users' windows. * 状态栏,只能有一个状态栏,位于屏幕顶端,其他窗口都位于它下方 */ publicstaticfinalintTYPE_STATUS_BAR= FIRST_SYSTEM_WINDOW;
/** * Window type: the search bar. There can be only one search bar * window; it is placed at the top of the screen. * In multiuser systems shows on all users' windows. * 搜索栏。只能有一个搜索栏,位于屏幕上方 */ publicstaticfinalintTYPE_SEARCH_BAR= FIRST_SYSTEM_WINDOW+1;
/** * Window type: phone. These are non-application windows providing * user interaction with the phone (in particular incoming calls). * These windows are normally placed above all applications, but behind * the status bar. * In multiuser systems shows on all users' windows. * 电话窗口,它用于电话交互(特别是呼入),置于所有应用程序之上,状态栏之下,属于悬浮窗(并且给一个Activity的话按下HOME键会出现看不到桌面上的图标异常情况) * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead. */ @Deprecated publicstaticfinalintTYPE_PHONE= FIRST_SYSTEM_WINDOW+2;
/** * Window type: system window, such as low power alert. These windows * In multiuser systems shows only on the owning user's window. * 系统警告提示窗口,出现在应用程序窗口之上,属于悬浮窗,但是会被禁止 * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead. */ @Deprecated publicstaticfinalintTYPE_SYSTEM_ALERT= FIRST_SYSTEM_WINDOW+3;
/** * Window type: keyguard window. * 锁屏窗口 * In multiuser systems shows on all users' windows. * @removed */ publicstaticfinalintTYPE_KEYGUARD= FIRST_SYSTEM_WINDOW+4;
/** * Window type: transient notifications. * In multiuser systems shows only on the owning user's window. * 信息窗口,用于显示Toast,不属于悬浮窗,但有悬浮窗的功能,缺点是在Andoid 2.3上无法接受点击事件 * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead. */ @Deprecated publicstaticfinalintTYPE_TOAST= FIRST_SYSTEM_WINDOW+5;
/** * Window type: system overlay windows, which need to be displayed * on top of everything else. These windows must not take input * focus, or they will interfere with the keyguard. * In multiuser systems shows only on the owning user's window. * 系统顶层窗口,显示在其他一切内容之上,此窗口不能获得输入焦点,否则影响锁屏 * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead. */ @Deprecated publicstaticfinalintTYPE_SYSTEM_OVERLAY= FIRST_SYSTEM_WINDOW+6;
/** * Window type: priority phone UI, which needs to be displayed even if * the keyguard is active. These windows must not take input * focus, or they will interfere with the keyguard. * In multiuser systems shows on all users' windows. * 电话优先,当锁屏时显示,此窗口不能获得输入焦点,否则影响锁屏 * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead. */ @Deprecated publicstaticfinalintTYPE_PRIORITY_PHONE= FIRST_SYSTEM_WINDOW+7;
/** * Window type: panel that slides out from the status bar * In multiuser systems shows on all users' windows. * 系统对话框窗口 */ publicstaticfinalintTYPE_SYSTEM_DIALOG= FIRST_SYSTEM_WINDOW+8;
/** * Window type: dialogs that the keyguard shows * In multiuser systems shows on all users' windows. * 锁屏时显示的对话框 */ publicstaticfinalintTYPE_KEYGUARD_DIALOG= FIRST_SYSTEM_WINDOW+9;
/** * Window type: internal system error windows, appear on top of * everything they can. * In multiuser systems shows only on the owning user's window. * 系统内部错误提示,显示在任何窗口之上 * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead. */ @Deprecated publicstaticfinalintTYPE_SYSTEM_ERROR= FIRST_SYSTEM_WINDOW+10;
/** * Window type: internal input methods windows, which appear above * the normal UI. Application windows may be resized or panned to keep * the input focus visible while this window is displayed. * 内部输入法窗口,显示于普通UI之上,应用程序可重新布局以免被此窗口覆盖 * In multiuser systems shows only on the owning user's window. */ publicstaticfinalintTYPE_INPUT_METHOD= FIRST_SYSTEM_WINDOW+11;
/** * Window type: internal input methods dialog windows, which appear above * the current input method window. * In multiuser systems shows only on the owning user's window. * 内部输入法对话框,显示于当前输入法窗口之上 */ publicstaticfinalint TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12;
/** * Window type: wallpaper window, placed behind any window that wants * to sit on top of the wallpaper. * In multiuser systems shows only on the owning user's window. * 墙纸窗口 */ publicstaticfinalintTYPE_WALLPAPER= FIRST_SYSTEM_WINDOW+13;
/** * Window type: panel that slides out from over the status bar * In multiuser systems shows on all users' windows. * 状态栏的滑动面板 * @removed */ publicstaticfinalintTYPE_STATUS_BAR_PANEL= FIRST_SYSTEM_WINDOW+14;
/** * Window type: secure system overlay windows, which need to be displayed * on top of everything else. These windows must not take input * focus, or they will interfere with the keyguard. * * This is exactly like {@link #TYPE_SYSTEM_OVERLAY} except that only the * system itself is allowed to create these overlays. Applications cannot * obtain permission to create secure system overlays. * * In multiuser systems shows only on the owning user's window. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) publicstaticfinalintTYPE_SECURE_SYSTEM_OVERLAY= FIRST_SYSTEM_WINDOW+15;
/** * Window type: the drag-and-drop pseudowindow. There is only one * drag layer (at most), and it is placed on top of all other windows. * In multiuser systems shows only on the owning user's window. * @hide */ publicstaticfinalintTYPE_DRAG= FIRST_SYSTEM_WINDOW+16;
/** * Window type: panel that slides out from over the status bar * In multiuser systems shows on all users' windows. These windows * are displayed on top of the stauts bar and any {@link #TYPE_STATUS_BAR_PANEL} * windows. * @hide */ publicstaticfinalintTYPE_STATUS_BAR_SUB_PANEL= FIRST_SYSTEM_WINDOW+17;
/** * Window type: (mouse) pointer * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_POINTER= FIRST_SYSTEM_WINDOW+18;
/** * Window type: Navigation bar (when distinct from status bar) * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_NAVIGATION_BAR= FIRST_SYSTEM_WINDOW+19;
/** * Window type: The volume level overlay/dialog shown when the user * changes the system volume. * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_VOLUME_OVERLAY= FIRST_SYSTEM_WINDOW+20;
/** * Window type: The boot progress dialog, goes on top of everything * in the world. * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_BOOT_PROGRESS= FIRST_SYSTEM_WINDOW+21;
/** * Window type to consume input events when the systemUI bars are hidden. * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_INPUT_CONSUMER= FIRST_SYSTEM_WINDOW+22;
/** * Window type: Navigation bar panel (when navigation bar is distinct from status bar) * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_NAVIGATION_BAR_PANEL= FIRST_SYSTEM_WINDOW+24;
/** * Window type: Display overlay window. Used to simulate secondary display devices. * In multiuser systems shows on all users' windows. * @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) publicstaticfinalintTYPE_DISPLAY_OVERLAY= FIRST_SYSTEM_WINDOW+26;
/** * Window type: Magnification overlay window. Used to highlight the magnified * portion of a display when accessibility magnification is enabled. * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_MAGNIFICATION_OVERLAY= FIRST_SYSTEM_WINDOW+27;
/** * Window type: Window for Presentation on top of private * virtual display. */ publicstaticfinalintTYPE_PRIVATE_PRESENTATION= FIRST_SYSTEM_WINDOW+30;
/** * Window type: Windows in the voice interaction layer. * @hide */ publicstaticfinalintTYPE_VOICE_INTERACTION= FIRST_SYSTEM_WINDOW+31;
/** * Window type: Windows that are overlaid <em>only</em> by a connected {@link * android.accessibilityservice.AccessibilityService} for interception of * user interactions without changing the windows an accessibility service * can introspect. In particular, an accessibility service can introspect * only windows that a sighted user can interact with which is they can touch * these windows or can type into these windows. For example, if there * is a full screen accessibility overlay that is touchable, the windows * below it will be introspectable by an accessibility service even though * they are covered by a touchable window. */ publicstaticfinalintTYPE_ACCESSIBILITY_OVERLAY= FIRST_SYSTEM_WINDOW+32;
/** * Window for displaying a handle used for resizing docked stacks. This window is owned * by the system process. * @hide */ publicstaticfinalintTYPE_DOCK_DIVIDER= FIRST_SYSTEM_WINDOW+34;
/** * Window type: like {@link #TYPE_APPLICATION_ATTACHED_DIALOG}, but used * by Quick Settings Tiles. * @hide */ publicstaticfinalintTYPE_QS_DIALOG= FIRST_SYSTEM_WINDOW+35;
/** * Window type: shows directly above the keyguard. The layer is * reserved for screenshot animation, region selection and UI. * In multiuser systems shows only on the owning user's window. * @hide */ publicstaticfinalintTYPE_SCREENSHOT= FIRST_SYSTEM_WINDOW + 36;
/** * Window type: Window for Presentation on an external display. * @see android.app.Presentation * @hide */ publicstaticfinalintTYPE_PRESENTATION= FIRST_SYSTEM_WINDOW + 37;
/** * Window type: Application overlay windows are displayed above all activity windows * (types between {@link #FIRST_APPLICATION_WINDOW} and {@link #LAST_APPLICATION_WINDOW}) * but below critical system windows like the status bar or IME. * <p> * The system may change the position, size, or visibility of these windows at anytime * to reduce visual clutter to the user and also manage resources. * <p> * Requires {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission. * <p> * The system will adjust the importance of processes with this window type to reduce the * chance of the low-memory-killer killing them. * <p> * In multi-user systems shows only on the owning user's screen. */ publicstaticfinalintTYPE_APPLICATION_OVERLAY= FIRST_SYSTEM_WINDOW + 38;
/** * Window type: Window for adding accessibility window magnification above other windows. * This will place the window in the overlay windows. * @hide */ publicstaticfinalintTYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY= FIRST_SYSTEM_WINDOW + 39;
/** * Window type: the notification shade and keyguard. There can be only one status bar * window; it is placed at the top of the screen, and all other * windows are shifted down so they are below it. * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_NOTIFICATION_SHADE= FIRST_SYSTEM_WINDOW + 40;
/** * Window type: used to show the status bar in non conventional parts of the screen (i.e. * the left or the bottom of the screen). * In multiuser systems shows on all users' windows. * @hide */ publicstaticfinalintTYPE_STATUS_BAR_ADDITIONAL= FIRST_SYSTEM_WINDOW + 41;
/** * End of types of system windows. * 最后一个系统窗口 */ publicstaticfinalintLAST_SYSTEM_WINDOW=2999;
/** * @hide * Used internally when there is no suitable type available. */ publicstaticfinalintINVALID_WINDOW_TYPE= -1;