Android WindowManager窗口类型,2021国内知名大厂Android岗面经

  • ZMS:OptionMenu、ContextMenu的默认类型

*/

public static final int TYPE_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

  • ZMS:TYPE_APPLICATION_MEDIA的重影窗口,显示在TYPE_APPLICATION_MEDIA和应用窗口之间

*/

public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW+4;

/**

  • End of types of sub-windows.

  • ZMS:最后一个子窗口-创建子窗口时,客户端可以指定窗口类型介于1000-1999之间,

  • 而WindowManagerService在进行窗口叠加时,会动态调整层值。

*/

public static final int LAST_SUB_WINDOW = 1999;

/**

  • Start of system-specific window types. These are not normally

  • created by applications.

  • ZMS:首个系统窗口-系统窗口,系统窗口不需要对应任何Activity,也不需要有父窗口,

  • 对于应用程序而言,理论上是无法创建系统窗口的,因为所有的应用程序都没有这个权限,

  • 然而系统进程却可以创建系统窗口。

*/

public static final int FIRST_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.

  • ZMS:状态栏窗口,层值2000。

*/

public static final int TYPE_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.

  • ZMS:搜索条窗口,层值2001。

*/

public static final int TYPE_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.

  • ZMS:来电显示窗口

*/


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部