Skip to content

Instantly share code, notes, and snippets.

@husaynhakeem
Created January 18, 2022 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save husaynhakeem/85e4fa3cb7961bac108bc19074b56eb6 to your computer and use it in GitHub Desktop.
Save husaynhakeem/85e4fa3cb7961bac108bc19074b56eb6 to your computer and use it in GitHub Desktop.
class RemoteViewInteropWidget : GlanceAppWidget() {
@Composable
override fun Content() {
Column {
Text(text = "Above remote views")
val context = LocalContext.current
AndroidRemoteViews(remoteViews = RemoteViewWidget(context))
Text(text = "Below remote views")
}
}
}
class RemoteViewWidget(context: Context) :
RemoteViews(context.packageName, R.layout.widget_remote_view) { /* ... */ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment