Android官方指导手册——WindowManager.LayoutParams中常量

为了方便浏览,暂记于此,可访问官网链接查看详情。

int ALPHA_CHANGED
int ANIMATION_CHANGED
float BRIGHTNESS_OVERRIDE_FULL
Value for screenBrightness and buttonBrightness indicating that the screen or button backlight brightness should be set to the hightest value when this window is in front.
该值是屏幕亮度和按钮亮度值,当窗口在前面时,设置该值表示屏幕或按钮背光亮度应为最高值。

float BRIGHTNESS_OVERRIDE_NONE
Default value for screenBrightness and buttonBrightness indicating that the brightness value is not overridden for this window and normal brightness policy should be used.
屏幕亮度和按钮亮度的默认值,指示此窗口的亮度值不被覆盖,应使用正常亮度策略。

float BRIGHTNESS_OVERRIDE_OFF
Value for screenBrightness and buttonBrightness indicating that the screen or button backlight brightness should be set to the lowest value when this window is in front.
屏幕亮度和按钮亮度值,指示当此窗口在前面时,屏幕或按钮背光亮度应设置为最低值。

int DIM_AMOUNT_CHANGED
dim数量变化

int FIRST_APPLICATION_WINDOW
Start of window types that represent normal application windows.

int FIRST_SUB_WINDOW
Start of types of sub-windows.

int FIRST_SYSTEM_WINDOW
Start of system-specific window types.

int FLAGS_CHANGED

int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
Window flag: as long as this window is visible to the user, allow the lock screen to activate while the screen is on.
窗口标志:只要该窗口对用户可见,就允许在屏幕打开时激活锁定屏幕。

int FLAG_ALT_FOCUSABLE_IM
Window flag: When set, input method can’t interact with the focusable window and can be placed to use more space and cover the input method.
窗口标志:设置时,输入方法不能与可聚焦窗口交互,可以放置以使用更多空间并覆盖输入方法。

int FLAG_BLUR_BEHIND
This constant was deprecated in API level 15. Blurring is no longer supported. * @apiSince 1

int FLAG_DIM_BEHIND
Window flag: everything behind this window will be dimmed.
窗口标志:这扇窗户后面的一切都将变暗。

int FLAG_DISMISS_KEYGUARD
This constant was deprecated in API level 26. Use FLAG_SHOW_WHEN_LOCKED or KeyguardManager#requestDismissKeyguard instead. Since keyguard was dismissed all the time as long as an activity with this flag on its window was focused, keyguard couldn’t guard against unintentional touches on the screen, which isn’t desired.
此常数在API级别26中已弃用。使用FLAG_SHOW_WHEN_LOCKED或KeyguardManager#requestDismissKeyguard代替。由于keyguard一直处于关闭状态,只要窗口上有此标志的活动是聚焦的,keyguard就无法防止无意中触摸屏幕,这是不需要的。

int FLAG_DITHER
This constant was deprecated in API level 17. This flag is no longer used. * @apiSince 1

int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
Flag indicating that this Window is responsible for drawing the background for the system bars.
指示此窗口负责绘制系统栏背景的标志。

int FLAG_FORCE_NOT_FULLSCREEN
This constant was deprecated in API level R. This value became API “by accident”, and shouldn’t be used by 3rd party applications.

int FLAG_FULLSCREEN
This constant was deprecated in API level R. Use WindowInsetsController#hide(int) with Type#statusBars() instead.

int FLAG_HARDWARE_ACCELERATED
Indicates whether this window should be hardware accelerated.
指示是否应硬件加速此窗口。

int FLAG_IGNORE_CHEEK_PRESSES
Window flag: intended for windows that will often be used when the user is holding the screen against their face, it will aggressively filter the event stream to prevent unintended presses in this situation that may not be desired for a particular window, when such an event stream is detected, the application will receive a CANCEL motion event to indicate this so applications can handle this accordingly by taking no action on the event until the finger is released.
窗口标志:用于当用户将屏幕靠在脸上时经常使用的窗口,它将积极地过滤事件流,以防止在这种情况下可能不需要对特定窗口进行的意外按下,当检测到这样的事件流时,应用程序将收到指出这一点,以便应用程序可以通过在释放手指之前不对事件采取任何操作来相应地处理此问题。

int FLAG_KEEP_SCREEN_ON
Window flag: as long as this window is visible to the user, keep the device’s screen turned on and bright.

int FLAG_LAYOUT_ATTACHED_IN_DECOR
This constant was deprecated in API level R. Use setFitInsetsTypes(int) to determine whether the attached window will overlap with system bars.
在API级别R中不推荐使用此常量。请使用setFitInsetsTypes(int)确定附加的窗口是否与系统栏重叠。

int FLAG_LAYOUT_INSET_DECOR
This constant was deprecated in API level R. Insets will always be delivered to your application.

int FLAG_LAYOUT_IN_OVERSCAN
This constant was deprecated in API level R. Overscan areas aren’t set by any Android product anymore.

int FLAG_LAYOUT_IN_SCREEN
Window flag for attached windows: Place the window within the entire screen, ignoring any constraints from the parent window.
附加窗口的窗口标志:将窗口放置在整个屏幕内,忽略来自父窗口的任何约束。

int FLAG_LAYOUT_NO_LIMITS
Window flag: allow window to extend outside of the screen.
窗口标志:允许窗口扩展到屏幕之外。

int FLAG_LOCAL_FOCUS_MODE
Flag for a window in local focus mode.
本地焦点模式下窗口的标志。

int FLAG_NOT_FOCUSABLE
Window flag: this window won’t ever get key input focus, so the user can not send key or other button events to it.
窗口标志:此窗口永远不会获得密钥输入焦点,因此用户不能向其发送密钥或其他按钮事件。

int FLAG_NOT_TOUCHABLE
Window flag: this window can never receive touch events.
窗口标志:此窗口永远不能接收触摸事件。

int FLAG_NOT_TOUCH_MODAL
Window flag: even when this window is focusable (its FLAG_NOT_FOCUSABLE is not set), allow any pointer events outside of the window to be sent to the windows behind it.
窗口标志:即使此窗口是可聚焦的(其标志“不可聚焦”未设置),也允许将窗口外的任何指针事件发送到其后面的窗口。

int FLAG_SCALED
Window flag: a special mode where the layout parameters are used to perform scaling of the surface when it is composited to the screen.
窗口标志:一种特殊的模式,其中布局参数用于在曲面合成到屏幕时执行缩放。

int FLAG_SECURE
Window flag: treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.
窗口标志:将窗口内容视为安全的,防止其出现在屏幕截图中或在非安全的显示器上被查看。

int FLAG_SHOW_WALLPAPER
Window flag: ask that the system wallpaper be shown behind your window.
窗口标志:要求在窗口后面显示系统墙纸。

int FLAG_SHOW_WHEN_LOCKED
This constant was deprecated in API level 27. Use R.attr.showWhenLocked or Activity.setShowWhenLocked(boolean) instead to prevent an unintentional double life-cycle event.

int FLAG_SPLIT_TOUCH
Window flag: when set the window will accept for touch events outside of its bounds to be sent to other windows that also support split touch.
窗口标志:当设置时,窗口将接受超出其界限的触摸事件,并将其发送到也支持拆分触摸的其他窗口。

int FLAG_TOUCHABLE_WHEN_WAKING
This constant was deprecated in API level 20. This flag has no effect.

int FLAG_TRANSLUCENT_NAVIGATION
This constant was deprecated in API level R. Use Window#setNavigationBarColor(int) with a half-translucent color instead.
此常量在API级别R中已弃用。请改用带有半半透明颜色的Window#setNavigationBarColor(int)。

int FLAG_TRANSLUCENT_STATUS
This constant was deprecated in API level R. Use Window#setStatusBarColor(int) with a half-translucent color instead.
此常量在API级别R中已弃用。请改用带有半半透明颜色的Window#setStatusBarColor(int)。

int FLAG_TURN_SCREEN_ON
This constant was deprecated in API level 27. Use R.attr.turnScreenOn or Activity.setTurnScreenOn(boolean) instead to prevent an unintentional double life-cycle event.

int FLAG_WATCH_OUTSIDE_TOUCH
Window flag: if you have set FLAG_NOT_TOUCH_MODAL, you can set this flag to receive a single special MotionEvent with the action MotionEvent#ACTION_OUTSIDE for touches that occur outside of your window.
窗口标志:如果您设置了flag_NOT_TOUCH_MODAL,则可以设置此标志以接收单个特殊的MotionEvent,其中action MotionEvent#action_位于窗口外部,用于发生在窗口外部的触摸。

int FORMAT_CHANGED

int LAST_APPLICATION_WINDOW
End of types of application windows.
应用程序窗口的类型结束。

int LAST_SUB_WINDOW
End of types of sub-windows.

int LAST_SYSTEM_WINDOW
End of types of system windows.

int LAYOUT_CHANGED

int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
The window is always allowed to extend into the DisplayCutout areas on the all edges of the screen.
窗口总是可以扩展到屏幕所有边缘上的显示剪切区域。

int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT
The window is allowed to extend into the DisplayCutout area, only if the DisplayCutout is fully contained within a system bar.
仅当系统栏中完全包含DisplayCutout时,才允许窗口扩展到DisplayCutout区域。

int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER
The window is never allowed to overlap with the DisplayCutout area.
窗口永远不允许与显示剪切区重叠。

int LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
The window is always allowed to extend into the DisplayCutout areas on the short edges of the screen.
窗口总是可以延伸到屏幕短边上的显示剪切区域。

int MEMORY_TYPE_CHANGED
int MEMORY_TYPE_GPU
This constant was deprecated in API level 15. this is ignored, this value is set automatically when needed.
此常数在API级别15中已弃用。这将被忽略,此值将在需要时自动设置。

int MEMORY_TYPE_HARDWARE
This constant was deprecated in API level 15. this is ignored, this value is set automatically when needed.

int MEMORY_TYPE_NORMAL
This constant was deprecated in API level 15. this is ignored, this value is set automatically when needed.

int MEMORY_TYPE_PUSH_BUFFERS
This constant was deprecated in API level 15. this is ignored, this value is set automatically when needed.

int ROTATION_ANIMATION_CHANGED
int ROTATION_ANIMATION_CROSSFADE
Value for rotationAnimation which specifies that this window will fade in or out following a rotation.
rotationAnimation的值,指定此窗口在旋转后淡入或淡出。

int ROTATION_ANIMATION_JUMPCUT
Value for rotationAnimation which specifies that this window will immediately disappear or appear following a rotation.
rotationAnimation的值,该值指定此窗口将在旋转后立即消失或显示。

int ROTATION_ANIMATION_ROTATE
Value for rotationAnimation which specifies that this window will visually rotate in or out following a rotation.
rotationAnimation的值,该值指定此窗口在旋转后可视地向内或向外旋转。

int ROTATION_ANIMATION_SEAMLESS
Value for rotationAnimation to specify seamless rotation mode.
用于指定无缝旋转模式的rotationAnimation的值。

int SCREEN_BRIGHTNESS_CHANGED
int SCREEN_ORIENTATION_CHANGED
int SOFT_INPUT_ADJUST_NOTHING
Adjustment option for softInputMode: set to have a window not adjust for a shown input method.
softInputMode的调整选项:设置为使窗口不针对所示的输入方法进行调整。

int SOFT_INPUT_ADJUST_PAN
Adjustment option for softInputMode: set to have a window pan when an input method is shown, so it doesn’t need to deal with resizing but just panned by the framework to ensure the current input focus is visible.
softInputMode的调整选项:设置为在显示输入方法时有一个窗口平移,因此它不需要处理大小调整,而只是由框架平移以确保当前输入焦点可见。

int SOFT_INPUT_ADJUST_RESIZE
This constant was deprecated in API level R. Call Window#setDecorFitsSystemWindows(boolean) with false and install an OnApplyWindowInsetsListener on your root content view that fits insets of type Type#ime().
在API级别R中不推荐使用此常量。请使用false调用WindowᙧsetDecorFitsSystemWindows(布尔值),并在根内容视图上安装适合于ᙧime()类型插入的OnApplyWindowInsetsListener。

int SOFT_INPUT_ADJUST_UNSPECIFIED
Adjustment option for softInputMode: nothing specified.
软输入模式的调整选项:未指定。

int SOFT_INPUT_IS_FORWARD_NAVIGATION
Bit for softInputMode: set when the user has navigated forward to the window.
softInputMode的位:当用户导航到窗口时设置。

int SOFT_INPUT_MASK_ADJUST
Mask for softInputMode of the bits that determine the way that the window should be adjusted to accommodate the soft input window.
确定窗口调整方式以适应软输入窗口的位的软输入模式掩码。

int SOFT_INPUT_MASK_STATE
Mask for softInputMode of the bits that determine the desired visibility state of the soft input area for this window.
用于确定此窗口软输入区域的所需可见性状态的位的软输入模式的掩码。

int SOFT_INPUT_MODE_CHANGED
int SOFT_INPUT_STATE_ALWAYS_HIDDEN
Visibility state for softInputMode: please always hide any soft input area when this window receives focus.
软输入模式的可见性状态:当此窗口收到焦点时,请始终隐藏任何软输入区域。

int SOFT_INPUT_STATE_ALWAYS_VISIBLE
Visibility state for softInputMode: please always make the soft input area visible when this window receives input focus.
软输入模式的可见性状态:当此窗口接收到输入焦点时,请始终使软输入区域可见。

int SOFT_INPUT_STATE_HIDDEN
Visibility state for softInputMode: please hide any soft input area when normally appropriate (when the user is navigating forward to your window).
软输入模式的可见性状态:请在正常情况下隐藏任何软输入区域(当用户导航到您的窗口时)。

int SOFT_INPUT_STATE_UNCHANGED
Visibility state for softInputMode: please don’t change the state of the soft input area.

int SOFT_INPUT_STATE_UNSPECIFIED
Visibility state for softInputMode: no state has been specified.

int SOFT_INPUT_STATE_VISIBLE
Visibility state for softInputMode: please show the soft input area when normally appropriate (when the user is navigating forward to your window).

int TITLE_CHANGED
int TYPE_ACCESSIBILITY_OVERLAY
Window type: Windows that are overlaid only by a connected AccessibilityService for interception of user interactions without changing the windows an accessibility service can introspect.
窗口类型:仅由连接的可访问性服务覆盖的窗口,用于拦截用户交互而不更改可访问性服务可以内省的窗口。

int TYPE_APPLICATION
Window type: a normal application window.

int TYPE_APPLICATION_ATTACHED_DIALOG
Window type: like TYPE_APPLICATION_PANEL, but layout of the window happens as that of a top-level window, not as a child of its container.
窗口类型:与type_APPLICATION_面板类似,但窗口的布局是作为顶层窗口的布局而不是作为其容器的子窗口的。

int TYPE_APPLICATION_MEDIA
Window type: window for showing media (such as video).

int TYPE_APPLICATION_OVERLAY
Window type: Application overlay windows are displayed above all activity windows (types between FIRST_APPLICATION_WINDOW and LAST_APPLICATION_WINDOW) but below critical system windows like the status bar or IME.
窗口类型:应用程序覆盖窗口显示在所有活动窗口(第一个应用程序窗口和最后一个应用程序窗口之间的类型)的上方,但在关键系统窗口(如状态栏或输入法)的下方。

int TYPE_APPLICATION_PANEL
Window type: a panel on top of an application window.

int TYPE_APPLICATION_STARTING
Window type: special application window that is displayed while the application is starting.
窗口类型:在应用程序启动时显示的特殊应用程序窗口。

int TYPE_APPLICATION_SUB_PANEL
Window type: a sub-panel on top of an application window.
窗口类型:应用程序窗口顶部的子面板。

int TYPE_BASE_APPLICATION
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.

int TYPE_CHANGED
int TYPE_DRAWN_APPLICATION
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.
窗口类型:type_应用程序的变体,确保窗口管理器在显示应用程序之前等待绘制此窗口。

int TYPE_INPUT_METHOD
Window type: internal input methods windows, which appear above the normal UI.
窗口类型:内部输入法窗口,显示在普通用户界面上方。

int TYPE_INPUT_METHOD_DIALOG
Window type: internal input methods dialog windows, which appear above the current input method window.

int TYPE_KEYGUARD_DIALOG
Window type: dialogs that the keyguard shows In multiuser systems shows on all users’ windows.

int TYPE_PHONE
This constant was deprecated in API level 26. for non-system apps. Use TYPE_APPLICATION_OVERLAY instead.
此常数在API级别26中已弃用。对于非系统应用程序。改为使用TYPE_APPLICATION_OVERLAY。

int TYPE_PRIORITY_PHONE
This constant was deprecated in API level 26. for non-system apps. Use TYPE_APPLICATION_OVERLAY instead.

int TYPE_PRIVATE_PRESENTATION
Window type: Window for Presentation on top of private virtual display.
窗口类型:在私有虚拟显示器上显示的窗口。

int TYPE_SEARCH_BAR
Window type: the search bar.

int TYPE_STATUS_BAR
Window type: the status bar.

int TYPE_STATUS_BAR_PANEL
Window type: panel that slides out from over the status bar In multiuser systems shows on all users’ windows.

int TYPE_SYSTEM_ALERT
This constant was deprecated in API level 26. for non-system apps. Use TYPE_APPLICATION_OVERLAY instead.

int TYPE_SYSTEM_DIALOG
Window type: panel that slides out from the status bar In multiuser systems shows on all users’ windows.

int TYPE_SYSTEM_ERROR
This constant was deprecated in API level 26. for non-system apps. Use TYPE_APPLICATION_OVERLAY instead.

int TYPE_SYSTEM_OVERLAY
This constant was deprecated in API level 26. for non-system apps. Use TYPE_APPLICATION_OVERLAY instead.

int TYPE_TOAST
This constant was deprecated in API level 26. for non-system apps. Use TYPE_APPLICATION_OVERLAY instead.

int TYPE_WALLPAPER
Window type: wallpaper window, placed behind any window that wants to sit on top of the wallpaper.

猜你喜欢

转载自blog.csdn.net/codeIsGood/article/details/105455138