GlanceRemoteViews
@ExperimentalGlanceRemoteViewsApi
class GlanceRemoteViews
Object containing the information needed to generate a RemoteViews. The same instance should be reused to compose layouts for a host view.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
suspend RemoteViewsCompositionResult |
compose(Triggers the composition of |
Public constructors
Public functions
compose
suspend fun compose(
context: Context,
size: DpSize,
state: Any? = null,
appWidgetOptions: Bundle = Bundle(),
content: @Composable () -> Unit
): RemoteViewsCompositionResult
Triggers the composition of content and returns the result.
| Parameters | |
|---|---|
context: Context |
The |
size: DpSize |
Size of the |
state: Any? = null |
Local view state that can be passed to composition through |
appWidgetOptions: Bundle = Bundle() |
AppWidget options |
content: @Composable () -> Unit |
Definition of the UI. |
| Returns | |
|---|---|
RemoteViewsCompositionResult |
Composition result containing the |