https://kotlinlang.org logo
#compose
Title
# compose
k

Kilian

09/28/2023, 9:57 AM
Can i use the Compose-Multiplatform Compiler to also compile androidx.glance.appwidget.GlanceAppWidget? It’s somewhat based on compose but lacks some features and it is also a pain point when upgrading koltin because the android compose compiler compatibility with kotlin lacks behind. Or should i just use an base xml layout for my Android Widget and use a compose view inside? (is this even possible?)
solved 1
j

jw

09/28/2023, 10:58 AM
You can, but the AndroidX compiler releases before the JetBrains one so you really won't gain anything
k

Kilian

09/28/2023, 1:53 PM
Ahh okay so i am going to use a dev build for the AndroidX compiler according to this page https://androidx.dev/storage/compose-compiler/repository
j

jw

09/28/2023, 1:54 PM
If you are using Kotlin 1.9.20 betas then yes, that is where you should get a build from. Otherwise every stable version of Kotlin has an associated stable AndroidX Compose compiler
k

Kilian

09/28/2023, 1:54 PM
thanks for clarifying
j

jw

09/28/2023, 1:58 PM
Ignore the misleading header above the table, but for anyone else playing along the stable release compatibility table is on this page: https://developer.android.com/jetpack/androidx/releases/compose-kotlin
r

romainguy

09/28/2023, 3:58 PM
Or should i just use an base xml layout for my Android Widget and use a compose view inside? (is this even possible?)
No you can’t. The whole point of RemoteViews is to not run app code inside the widget host (Launcher/Home)
3 Views