Any news on writing widgets in Compose?
# compose
e
Any news on writing widgets in Compose?
i
Like Android home screen widgets? (remoteviews)
a
jetc.dev's newsletter has a little on it https://jetc.dev/
It's called
glance
and it's under active development https://github.com/androidx/androidx/commits/androidx-main/glance
i
Glancing, pun intended, at this: worth calling out that while they appear to be adding intentional support to render compose to widget that this is limited to how widgets work meaning it's remoteviews and you're basically rendering a bitmap and handing it off and waiting for events like a timer or a resize event to trigger an update
not overwhelmingly useful but a nice to have
a
Why isn't it overwhelmingly useful?
From what I understand this will give you want you're already able to do but now via Compose?
i
Because widgets are inherently rather simple and do not benefit from a vast majority of the overall compose feature set such as animation, rendering performance, state management, etc
a
But it's useful if you want to write widgets in Compose, surely?
i
sounds like a nice to have then 😉
a
Anything that gets me away from the horror of XML and usual Android development is gratefully received.
👍 1
e
Dealing with remote views and XML is pure pain so anything to make that simpler is welcomed :)
Awesome that link is what I wanted to see :)