Google is committed to advancing racial equity for Black communities. See how.

Renderer

public final class Renderer
extends Object

java.lang.Object
   ↳ androidx.autofill.inline.Renderer


Renderer class responsible for rendering the inline suggestion UI.

Summary

Public methods

static PendingIntent getAttributionIntent(Slice content)

Returns a PendingIntent that will be launched on long clicking the UI to show attribution information via a Dialog.

static Bundle getSupportedInlineUiVersionsAsBundle()

Returns all the supported versions wrapped in a Bundle.

static View render(Context context, Slice content, Bundle styles)

Inherited methods

Public methods

getAttributionIntent

public static PendingIntent getAttributionIntent (Slice content)

Returns a PendingIntent that will be launched on long clicking the UI to show attribution information via a Dialog.

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

Parameters
content Slice: the UI content which contains a PendingIntent representing the attribution information

Returns
PendingIntent

getSupportedInlineUiVersionsAsBundle

public static Bundle getSupportedInlineUiVersionsAsBundle ()

Returns all the supported versions wrapped in a Bundle.

Returns
Bundle

render

public static View render (Context context, 
                Slice content, 
                Bundle styles)

Parameters
context Context: the context used to render the view

content Slice: represents the UI content

styles Bundle: contains a mapping from UI version to corresponding UI style specification

Returns
View 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.