Hello. Android noob here. I’m developing an app us...
# glance
i
Hello. Android noob here. I’m developing an app using compose MP, that also has a widget in android using glance (didn’t get to the iOS widget part yet). I understand that glance provides it’s own composable UI functions like Row, Column etc, but is not using the equivalent compose functions of Row, Column etc. It also has it’s own Modifier and the function params are a bit different. My question is, is there a good way/pattern to share ui logic between my main app code and the widget? like if i want to reuse some components/ui logic between the two. So far i can’t find or think of a way to do it without copy/paste/tweak?
👍 2
a
UI would be impossible to share. The data layer can be shared
e
I have an unconventional idea here. Since Glance supports
AndroidRemoteView
, could we potentially use Glance Compose as a container for an
AndroidRemoteView
? Within the
AndroidRemoteView
, we could then embed a
ComposeView
. I'm curious if this approach might be feasible 😅
a
Remote views are not views, views can only be embedded in views