State of Compose 2023 results are in! Click here to learn more

← Back to Glance AppWidget

AndroidRemoteViews

Component
in
Glance AppWidget
. Since 1.0.0

Overview

Code Examples

Video

Add RemoteViews into a glance composition.

@param remoteViews the views to add to the composition.

Overloads

AndroidRemoteViews

@Composable
fun AndroidRemoteViews(remoteViews: RemoteViews)

Parameters

NameDescription
remoteViewsthe views to add to the composition

AndroidRemoteViews

@Composable
fun AndroidRemoteViews(
    remoteViews: RemoteViews,
    @IdRes containerViewId: Int,
    content: @Composable () -> Unit,
)

Parameters

NameDescription
remoteViewsthe views to add to the composition.
containerViewIddefines the view id of the container in the RemoteViews provided. Any pre-existing children of that view will be removed with RemoteViews.removeAllViews, and any children defined in the content block will be added with RemoteViews.addView (or RemoteViews.addStableView if available on the system)