다음을 통해 공유


Window.ColorMode Property

Definition

Returns the requested color mode of the window, one of ActivityInfo#COLOR_MODE_DEFAULT, ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT or ActivityInfo#COLOR_MODE_HDR. -or- Sets the requested color mode of the window.

public virtual Android.Content.PM.ActivityColorMode ColorMode { [Android.Runtime.Register("getColorMode", "()I", "GetGetColorModeHandler", ApiSince=26)] get; [Android.Runtime.Register("setColorMode", "(I)V", "GetSetColorMode_IHandler", ApiSince=26)] set; }
[<get: Android.Runtime.Register("getColorMode", "()I", "GetGetColorModeHandler", ApiSince=26)>]
[<set: Android.Runtime.Register("setColorMode", "(I)V", "GetSetColorMode_IHandler", ApiSince=26)>]
member this.ColorMode : Android.Content.PM.ActivityColorMode with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Returns the requested color mode of the window, one of ActivityInfo#COLOR_MODE_DEFAULT, ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT or ActivityInfo#COLOR_MODE_HDR. If ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT was requested it is possible the window will not be put in wide color gamut mode depending on device and display support for that mode. Use #isWideColorGamut to determine if the window is currently in wide color gamut mode.

Java documentation for android.view.Window.getColorMode().

Property setter documentation:

Sets the requested color mode of the window. The requested the color mode might override the window's pixel WindowManager.LayoutParams#format format.

The requested color mode must be one of ActivityInfo#COLOR_MODE_DEFAULT, ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT or ActivityInfo#COLOR_MODE_HDR.

The requested color mode is not guaranteed to be honored. Please refer to #getColorMode() for more information.

Java documentation for android.view.Window.setColorMode(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to