Renderer
@RequiresApi(30) class Renderer
kotlin.Any | |
↳ | androidx.autofill.inline.Renderer |
Renderer class responsible for rendering the inline suggestion UI.
Summary
Public methods | |
---|---|
static PendingIntent? |
getAttributionIntent(@NonNull content: Slice) Returns a |
static Bundle |
Returns all the supported versions wrapped in a |
static View? |
Public methods
getAttributionIntent
@Nullable static fun getAttributionIntent(@NonNull content: Slice): PendingIntent?
Returns a PendingIntent
that will be launched on long clicking the UI to show attribution information via a android.app.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 |
getSupportedInlineUiVersionsAsBundle
@NonNull static fun getSupportedInlineUiVersionsAsBundle(): Bundle
Returns all the supported versions wrapped in a Bundle
.
render
@Nullable static fun render(
@NonNull context: Context,
@NonNull content: Slice,
@NonNull styles: Bundle
): View?
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 |
Return | |
---|---|
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 . |