Share via


Window.StatusBarContrastEnforced Property

Definition

Returns whether the system is ensuring that the status bar has enough contrast when a fully transparent background is requested. -or- Sets whether the system should ensure that the status bar has enough contrast when a fully transparent background is requested.

public virtual bool StatusBarContrastEnforced { [Android.Runtime.Register("isStatusBarContrastEnforced", "()Z", "GetIsStatusBarContrastEnforcedHandler", ApiSince=29)] get; [Android.Runtime.Register("setStatusBarContrastEnforced", "(Z)V", "GetSetStatusBarContrastEnforced_ZHandler", ApiSince=29)] set; }
[<get: Android.Runtime.Register("isStatusBarContrastEnforced", "()Z", "GetIsStatusBarContrastEnforcedHandler", ApiSince=29)>]
[<set: Android.Runtime.Register("setStatusBarContrastEnforced", "(Z)V", "GetSetStatusBarContrastEnforced_ZHandler", ApiSince=29)>]
member this.StatusBarContrastEnforced : bool with get, set

Property Value

true, if the system is ensuring contrast, false otherwise.

Attributes

Remarks

Property getter documentation:

Returns whether the system is ensuring that the status bar has enough contrast when a fully transparent background is requested.

When the status bar color has a non-zero alpha value, the value of this property has no effect.

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

Property setter documentation:

Sets whether the system should ensure that the status bar has enough contrast when a fully transparent background is requested.

If set to this value, the system will determine whether a scrim is necessary to ensure that the status bar has enough contrast with the contents of this app, and set an appropriate effective bar background color accordingly.

When the status bar color has a non-zero alpha value, the value of this property has no effect.

Java documentation for android.view.Window.setStatusBarContrastEnforced(boolean).

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