다음을 통해 공유


View.OutlineProvider Property

Definition

Returns the current ViewOutlineProvider of the view, which generates the Outline that defines the shape of the shadow it casts, and enables outline clipping. -or- Sets the ViewOutlineProvider of the view, which generates the Outline that defines the shape of the shadow it casts, and enables outline clipping.

public virtual Android.Views.ViewOutlineProvider? OutlineProvider { [Android.Runtime.Register("getOutlineProvider", "()Landroid/view/ViewOutlineProvider;", "GetGetOutlineProviderHandler")] get; [Android.Runtime.Register("setOutlineProvider", "(Landroid/view/ViewOutlineProvider;)V", "GetSetOutlineProvider_Landroid_view_ViewOutlineProvider_Handler")] set; }
[<get: Android.Runtime.Register("getOutlineProvider", "()Landroid/view/ViewOutlineProvider;", "GetGetOutlineProviderHandler")>]
[<set: Android.Runtime.Register("setOutlineProvider", "(Landroid/view/ViewOutlineProvider;)V", "GetSetOutlineProvider_Landroid_view_ViewOutlineProvider_Handler")>]
member this.OutlineProvider : Android.Views.ViewOutlineProvider with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Returns the current ViewOutlineProvider of the view, which generates the Outline that defines the shape of the shadow it casts, and enables outline clipping.

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

Property setter documentation:

Sets the ViewOutlineProvider of the view, which generates the Outline that defines the shape of the shadow it casts, and enables outline clipping.

The default ViewOutlineProvider, ViewOutlineProvider#BACKGROUND, queries the Outline from the View's background drawable, via Drawable#getOutline(Outline). Changing the outline provider with this method allows this behavior to be overridden.

If the ViewOutlineProvider is null, if querying it for an outline returns false, or if the produced Outline is Outline#isEmpty(), shadows will not be cast.

Only outlines that return true from Outline#canClip() may be used for clipping.

Java documentation for android.view.View.setOutlineProvider(android.view.ViewOutlineProvider).

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

See also