📧 Stay updated with the latest tools, products and offers from Composables! Subscribe

AndroidRemoteViews

Android

Component in Jetpack Glance

Add [RemoteViews] into a glance composition.

Last updated:

Installation

dependencies {
   implementation("androidx.glance:glance-appwidget:1.2.0-alpha01")
}

Overloads

@Composable
fun AndroidRemoteViews(remoteViews: RemoteViews, modifier: GlanceModifier = GlanceModifier)

Parameters

namedescription
remoteViewsthe views to add to the composition.
modifiermodifier used to adjust the layout algorithm or draw decoration content.
@Composable
fun AndroidRemoteViews(
    remoteViews: RemoteViews,
    @IdRes containerViewId: Int,
    modifier: GlanceModifier = GlanceModifier,
    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).
modifiermodifier used to adjust the layout algorithm or draw decoration content.
contentthe content that will be added to the provided container.
by @alexstyl