Android 12: migrate to WindowMetrics API#5346
Merged
hichamboushaba merged 5 commits intodevelopfrom Nov 26, 2021
Merged
Conversation
|
You can test the changes on this Pull Request by downloading the APK here. |
malinajirka
approved these changes
Nov 26, 2021
Contributor
malinajirka
left a comment
There was a problem hiding this comment.
LGTM, thanks! Not merging since we need to update the hash first.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/wpmediapicker/WPMediaGalleryView.kt
Outdated
Show resolved
Hide resolved
WooCommerce/src/main/kotlin/com/woocommerce/android/widgets/WCProductImageGalleryView.kt
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #5342
Please don't merge until a
developcommit from WordPress-Utils is used.Description
This PR updates the WordPress-Utils library to make sure we use the updated API WindowMetrics for calculating the window sizes, and update the method calls to use the ones with clearer names (refer to wordpress-mobile/WordPress-Utils-Android#99 for more details).
Just as an example of what those changes will fix, is for Dialogs where we need a fixed size related to the Window size, we've been wrongly using
DisplayUtils#getDisplayPixelWidthwithout passing a context, which resulted in the following issues:Testing instructions
The APIs are used in multiple places, but just to confirm there is no regression, go to the Product images gallery, and check that the images have the right size, with fullscreen, and with split-screen.
And for the PR review, check if I didn't use a wrong version of any method.
RELEASE-NOTES.txtif necessary.