-
Notifications
You must be signed in to change notification settings - Fork 118
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
Compose placeholders #1095
Compose placeholders #1095
Conversation
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.
@planarvoid Tested in the Day One app using a Samsung device and these latest changes work nicely! I made a couple minor code comments for your review. I'm not merging this PR since it looks like it may be waiting for Klym and Danilo as well, but on my end it looks good. 👍🏻
media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ViewPlaceholderManager.kt
Outdated
Show resolved
Hide resolved
media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ViewPlaceholderManager.kt
Outdated
Show resolved
Hide resolved
media-placeholders/src/main/java/org/wordpress/aztec/placeholders/ViewPlaceholderManager.kt
Outdated
Show resolved
Hide resolved
…ers/ViewPlaceholderManager.kt Co-authored-by: Amanda Riu <[email protected]>
…ers/ViewPlaceholderManager.kt Co-authored-by: Amanda Riu <[email protected]>
…ers/ViewPlaceholderManager.kt Co-authored-by: Amanda Riu <[email protected]>
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.
This has been tested in Day One Android and is working as expected!
…to feature/compose-placeholders
Fix
In this PR I'm implementing a parallel solution that allows you to draw placeholders in Jetpack Compose instead of Android Views. This is actually more reliable, especially when considering redrawing which was hard to do with AV.
I created the compose placeholder manager from the previous manager and cleaned up things that I think are not necessary with compose. It should be much more straightforward because the compose view should be redrawn when the state changes without any forced redrawns.
This PR is much smaller than it seems because
ViewPlaceholderManager
is just a rename ofPlaceholderManager
so it doesn't need to be reviewed.Test
Test this feature with the related DO PR.
Review
@danilo04
Make sure strings will be translated:
strings.xml
as a part of the integration PR.