# RemoteViews.RemoteViewOutlineProvider

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# RemoteViewOutlineProvider

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/widget/RemoteViews.RemoteViewOutlineProvider "View this page in Java")  

```
class RemoteViewOutlineProvider : ViewOutlineProvider
```

|---|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                  |||
| ↳ | [android.view.ViewOutlineProvider](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#)                                       ||
|   | ↳ | [android.widget.RemoteViews.RemoteViewOutlineProvider](https://developer.android.com/reference/kotlin/android/widget/RemoteViews.RemoteViewOutlineProvider#) |

OutlineProvider for a view with a radius set by[setViewOutlinePreferredRadius(int,float,int)](https://developer.android.com/reference/kotlin/android/widget/RemoteViews#setViewOutlinePreferredRadius(kotlin.Int,%20kotlin.Float,%20kotlin.Int)).

## Summary

|                                                                                                                               Public constructors                                                                                                                                ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [RemoteViewOutlineProvider](https://developer.android.com/reference/kotlin/android/widget/RemoteViews.RemoteViewOutlineProvider#RemoteViewOutlineProvider(kotlin.Float))`(`radius:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` <br /> |

|                                                                                                                                                                                                                                                   Public methods                                                                                                                                                                                                                                                   ||
|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)   | [getOutline](https://developer.android.com/reference/kotlin/android/widget/RemoteViews.RemoteViewOutlineProvider#getOutline(android.view.View,%20android.graphics.Outline))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)`, `outline:` `[Outline](https://developer.android.com/reference/kotlin/android/graphics/Outline.html#)`)` Called to get the provider to populate the Outline. |
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [getRadius](https://developer.android.com/reference/kotlin/android/widget/RemoteViews.RemoteViewOutlineProvider#getRadius())`()` Returns the corner radius used when providing the view outline.                                                                                                                                                                                                                                   |

| Inherited properties ||
|---|---|
| From class[ViewOutlineProvider](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#) |---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ViewOutlineProvider](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#)! | [BACKGROUND](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#BACKGROUND:android.view.ViewOutlineProvider) <br /> Default outline provider for Views, which queries the Outline from the View's background, or generates a 0 alpha, rectangular Outline the size of the View if a background isn't present. <br /> | | [ViewOutlineProvider](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#)! | [BOUNDS](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#BOUNDS:android.view.ViewOutlineProvider) <br /> Maintains the outline of the View to match its rectangular bounds, at`1.0f`alpha. This can be used to enable Views that are opaque but lacking a background cast a shadow. <br />                        | | [ViewOutlineProvider](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#)! | [PADDED_BOUNDS](https://developer.android.com/reference/kotlin/android/view/ViewOutlineProvider.html#PADDED_BOUNDS:android.view.ViewOutlineProvider) <br /> Maintains the outline of the View to match its rectangular padded bounds, at`1.0f`alpha. This can be used to enable Views that are opaque but lacking a background cast a shadow. <br />   | ||

## Public constructors

### RemoteViewOutlineProvider

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
RemoteViewOutlineProvider(radius: Float)
```

## Public methods

### getOutline

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
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()](https://developer.android.com/reference/kotlin/android/view/View.html#invalidateOutline())is called explicitly. The input outline is empty and has an alpha of`1.0f`.

|                                                           Parameters                                                            ||
|-----------|----------------------------------------------------------------------------------------------------------------------|
| `view`    | [View](https://developer.android.com/reference/kotlin/android/view/View.html#):This value cannot be`null`.           |
| `outline` | [Outline](https://developer.android.com/reference/kotlin/android/graphics/Outline.html#):This value cannot be`null`. |

### getRadius

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getRadius(): Float
```

Returns the corner radius used when providing the view outline.