Issue
Jetpack released a tool called "Glance" that we can replace RemoteViews XML widgets.
I wonder how it converts compose layouts to RemoteViews.
Thanks.
Solution
It does use XML underneath. It uses compose runtime to parse the node-tree, then it takes the corresponding pre-generated XML file and uses remoteviews to modify it's attributes. Then it composes everything into a single RemoteView that is sent to the AppWidget manager.
You can dive in into the code yourself. It's open source ;) https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:glance
Answered By - Marcel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.