Added in API level 31

RemoteViewOutlineProvider

class RemoteViewOutlineProvider : ViewOutlineProvider
kotlin.Any
   ↳ android.view.ViewOutlineProvider
   ↳ android.widget.RemoteViews.RemoteViewOutlineProvider

OutlineProvider for a view with a radius set by setViewOutlinePreferredRadius(int,float,int).

Summary

Public constructors

Public methods
Unit
getOutline(view: View, outline: Outline)

Called to get the provider to populate the Outline.

Float

Returns the corner radius used when providing the view outline.

Inherited properties

Public constructors

RemoteViewOutlineProvider

Added in API level 31
RemoteViewOutlineProvider(radius: Float)

Public methods

getOutline

Added in API level 31
fun getOutline(
    view: View,
    outline: Outline
): Unit

Called to get the provider to populate the Outline. This method will be called by a View when its owned Drawables are invalidated, when the View's size changes, or if View#invalidateOutline() is called explicitly. The input outline is empty and has an alpha of 1.0f.

Parameters
view View: This value cannot be null.
outline Outline: This value cannot be null.

getRadius

Added in API level 31
fun getRadius(): Float

Returns the corner radius used when providing the view outline.