# 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)
public final class Renderer
```

<br />

*** ** * ** ***

Renderer class responsible for rendering the inline suggestion UI.

## Summary

| ### Public methods |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/app/PendingIntent.html` | `https://developer.android.com/reference/androidx/autofill/inline/Renderer#getAttributionIntent(android.app.slice.Slice)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/slice/Slice.html content)` 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`. |
| `static @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/autofill/inline/Renderer#getSupportedInlineUiVersionsAsBundle()()` Returns all the supported versions wrapped in a `https://developer.android.com/reference/android/os/Bundle.html`. |
| `static @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/View.html` | `https://developer.android.com/reference/androidx/autofill/inline/Renderer#render(android.content.Context,android.app.slice.Slice,android.os.Bundle)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/slice/Slice.html content, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html styles )` |

## Public methods

### getAttributionIntent

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

```
public static @Nullable PendingIntent getAttributionIntent(@NonNull Slice content)
```

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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/slice/Slice.html content` | 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)

```
public static @NonNull Bundle getSupportedInlineUiVersionsAsBundle()
```

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)

```
public static @Nullable View render(
    @NonNull Context context,
    @NonNull Slice content,
    @NonNull Bundle styles
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable 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`. |