# Renderer

Artifact: [androidx.autofill:autofill](https://developer.android.com/jetpack/androidx/releases/autofill) [View Source](https://cs.android.com/search?q=file:androidx/autofill/inline/Renderer.java+class:androidx.autofill.inline.Renderer) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

*** ** * ** ***


```
@RequiresApi(api = Build.VERSION_CODES.R)
class Renderer
```

<br />

*** ** * ** ***

Renderer class responsible for rendering the inline suggestion UI.

## Summary

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/android/app/PendingIntent.html?` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/Renderer#getAttributionIntent(android.app.slice.Slice)(content: https://developer.android.com/reference/android/app/slice/Slice.html)` Returns a `https://developer.android.com/reference/android/app/PendingIntent.html` that will be launched on long clicking the UI to show attribution information via a `https://developer.android.com/reference/android/app/Dialog.html`. |
| `java-static https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/Renderer#getSupportedInlineUiVersionsAsBundle()()` Returns all the supported versions wrapped in a `https://developer.android.com/reference/android/os/Bundle.html`. |
| `java-static https://developer.android.com/reference/android/view/View.html?` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/Renderer#render(android.content.Context,android.app.slice.Slice,android.os.Bundle)(context: https://developer.android.com/reference/android/content/Context.html, content: https://developer.android.com/reference/android/app/slice/Slice.html, styles: https://developer.android.com/reference/android/os/Bundle.html)` |

## Public functions

### getAttributionIntent

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
java-static fun getAttributionIntent(content: Slice): PendingIntent?
```

Returns a `https://developer.android.com/reference/android/app/PendingIntent.html` that will be launched on long clicking the UI to show attribution information via a `https://developer.android.com/reference/android/app/Dialog.html`.

The attribution UI indicates to the user the source of the UI content.

| Parameters |
|---|---|
| `content: https://developer.android.com/reference/android/app/slice/Slice.html` | the UI content which contains a `https://developer.android.com/reference/android/app/PendingIntent.html` representing the attribution information |

### getSupportedInlineUiVersionsAsBundle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
java-static fun getSupportedInlineUiVersionsAsBundle(): Bundle
```

Returns all the supported versions wrapped in a `https://developer.android.com/reference/android/os/Bundle.html`.

### render

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
java-static fun render(context: Context, content: Slice, styles: Bundle): View?
```

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | the context used to render the view |
| `content: https://developer.android.com/reference/android/app/slice/Slice.html` | represents the UI content |
| `styles: https://developer.android.com/reference/android/os/Bundle.html` | contains a mapping from UI version to corresponding UI style specification |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/view/View.html?` | a view rendered based on the provided UI content and the style with corresponding version or `null` when the UI version indicated by the slice is either unsupported by the Renderer, or not provided in the `styles`. |