I just wanted to share something that I found duri...
# compose
c
I just wanted to share something that I found during my adventures with compose: On Android, adding an
OnDrawListener
to an Activity's content view
ViewTreeObserver
and then performing some operations to the tune of 1-2 milliseconds, completely broke the compose rendering of my UI. It presented itself in really odd ways (with my lack of understanding of the general compose behaviour anyway) whereby a
TextField
cursor would not blink, and updates to the
TextField
would not be displayed consistently. I'm going to try and make a tiny reproducible example complete with a work around that seemed to work for me, which was to simply
<http://handler.post|handler.post>(...)
the work from the
OnDrawListener
method, instead of handling the work as the draw event fired. I just wanted to get that out lest I pull a 'me' and fail to follow through on a small reproducible example. EDIT: I did it https://github.com/ChrisAJS/JetpackComposeRenderIssueExample/tree/main Raised a bug too, phew, that's pretty much an entire day's work done! https://issuetracker.google.com/issues/227875474