New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DrawablePainter] Fix reacting to intrinsic size changes #1124
Conversation
Currently DrawablePainter has an `invalidateTick` which triggers a draw pass, but there is nothing to trigger a layout pass. This PR adds another tick for layout, which is triggered when the intrinsic size changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
drawablepainter/src/main/java/com/google/accompanist/drawablepainter/DrawablePainter.kt
Outdated
Show resolved
Hide resolved
drawablepainter/src/main/java/com/google/accompanist/drawablepainter/DrawablePainter.kt
Outdated
Show resolved
Hide resolved
That will teach me for trying to do this via the web editor
Failed on API 22 only. Probably needs a CI re-run |
Ready to merge! |
Sorry, but I left one more comment 2 days ago, you probably didn't notice it |
Woops. Replied. |
Replied again. Sorry for the back and forth, just trying to understand the issue more |
We now just rely on the Drawable notifying the painter from invalidateDrawable()
Currently DrawablePainter has an
invalidateTick
which triggers a draw pass, but there is nothing to trigger a layout pass. This PR adds another tick for layout, which is triggered when the intrinsic size changes