共用方式為


View.ForceDarkAllowed Property

Definition

See #setForceDarkAllowed(boolean) -or- Sets whether or not to allow force dark to apply to this view.

public virtual bool ForceDarkAllowed { [Android.Runtime.Register("isForceDarkAllowed", "()Z", "GetIsForceDarkAllowedHandler", ApiSince=29)] get; [Android.Runtime.Register("setForceDarkAllowed", "(Z)V", "GetSetForceDarkAllowed_ZHandler", ApiSince=29)] set; }
[<get: Android.Runtime.Register("isForceDarkAllowed", "()Z", "GetIsForceDarkAllowedHandler", ApiSince=29)>]
[<set: Android.Runtime.Register("setForceDarkAllowed", "(Z)V", "GetSetForceDarkAllowed_ZHandler", ApiSince=29)>]
member this.ForceDarkAllowed : bool with get, set

Property Value

true if force dark is allowed (default), false if it is disabled

Attributes

Remarks

Property getter documentation:

See #setForceDarkAllowed(boolean)

Java documentation for android.view.View.isForceDarkAllowed().

Property setter documentation:

Sets whether or not to allow force dark to apply to this view.

Setting this to false will disable the auto-dark feature on everything this view draws, including any descendants.

Setting this to true will allow this view to be automatically made dark, however a value of 'true' will not override any 'false' value in its parent chain nor will it prevent any 'false' in any of its children.

The default behavior of force dark is also influenced by the Theme's android.R.styleable#Theme_isLightTheme isLightTheme attribute. If a theme is isLightTheme="false", then force dark is globally disabled for that theme.

Java documentation for android.view.View.setForceDarkAllowed(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