Renderer
@RequiresApi(api = Build.VERSION_CODES.R)
class Renderer
Renderer class responsible for rendering the inline suggestion UI.
Summary
Public functions |
|
|---|---|
java-static PendingIntent? |
getAttributionIntent(content: Slice)Returns a |
java-static Bundle |
Returns all the supported versions wrapped in a |
java-static View? |
Public functions
getAttributionIntent
java-static fun getAttributionIntent(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 |
getSupportedInlineUiVersionsAsBundle
java-static fun getSupportedInlineUiVersionsAsBundle(): Bundle
Returns all the supported versions wrapped in a Bundle.
render
java-static fun render(context: Context, content: Slice, 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 |
| Returns | |
|---|---|
View? |
a view rendered based on the provided UI content and the style with corresponding version or |