Partager via


View.SetOutlineAmbientShadowColor(Color) Method

Definition

Sets the color of the ambient shadow that is drawn when the view has a positive Z or elevation value.

[Android.Runtime.Register("setOutlineAmbientShadowColor", "(I)V", "GetSetOutlineAmbientShadowColor_IHandler", ApiSince=28)]
public virtual void SetOutlineAmbientShadowColor (Android.Graphics.Color color);
[<Android.Runtime.Register("setOutlineAmbientShadowColor", "(I)V", "GetSetOutlineAmbientShadowColor_IHandler", ApiSince=28)>]
abstract member SetOutlineAmbientShadowColor : Android.Graphics.Color -> unit
override this.SetOutlineAmbientShadowColor : Android.Graphics.Color -> unit

Parameters

color
Color

The color this View will cast for its elevation shadow.

Attributes

Remarks

Sets the color of the ambient shadow that is drawn when the view has a positive Z or elevation value.

By default the shadow color is black. Generally, this color will be opaque so the intensity of the shadow is consistent between different views with different colors.

The opacity of the final ambient shadow is a function of the shadow caster height, the alpha channel of the outlineAmbientShadowColor (typically opaque), and the android.R.attr#ambientShadowAlpha theme attribute.

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