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

cuongtd

06/08/2021, 1:44 PM
is it possible to create app widget in jetpack compose project now?
🚫 1
a

Adam Powell

06/08/2021, 2:26 PM
"possible" in that you can write your own
Applier
and primitives that use
ComposeNode
to assemble a
RemoteViews
for the appwidget system using only public API from compose-runtime, yes, but there's quite a bit of work there
c

cuongtd

06/08/2021, 2:41 PM
@Adam Powell okay, thank you, it sounds not a solution for beginner like me
a

Adam Powell

06/08/2021, 2:42 PM
If you'd like a weekend hack project for fun and to learn how compose works internally, and you already have a good grasp of RemoteViews, it's more approachable than you might think. If you're on a time budget, maybe not 🙂
The compose team did a hack week project of exactly this about a year and a half ago but targeting notifications rather than appwidgets; it works but there are plenty of edge cases and API design questions to consider around it. It's definitely jumping into the deep end of the pool
c

cuongtd

06/08/2021, 2:46 PM
@Adam Powell I have a lot of spare time now, but I don’t have much knowledge of xml, activity. I just made some basic apps with jetpack compose
2 Views