-
Notifications
You must be signed in to change notification settings - Fork 25k
Fix Dimensions window values on Android < 15 (#47554) #52481
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
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D77906644 |
|
@alanleedev I provided the fix to the crash on Android 7 here EDIT: I opened a PR on your fork to fix it alanleedev#1 |
3b8b083 to
129f126
Compare
Summary: This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled. Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15): <img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" /> Using `WindowMetricsCalculator` from AndroidX: <img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" /> Fixes facebook#47080 ## Changelog: [Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled Test Plan: Run the example app on an Android < 15 device. Rollback Plan: Reviewed By: cortinico Differential Revision: D77906644
|
This pull request was exported from Phabricator. Differential Revision: D77906644 |
129f126 to
e410580
Compare
Summary: Pull Request resolved: facebook#52481 This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled. Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15): <img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" /> Using `WindowMetricsCalculator` from AndroidX: <img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" /> Fixes facebook#47080 ## Changelog: [Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled Pull Request resolved: facebook#47554 Test Plan: Run the example app on an Android < 15 device. Rollback Plan: Reviewed By: cortinico Differential Revision: D77906644
Summary: This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled. Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15): <img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" /> Using `WindowMetricsCalculator` from AndroidX: <img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" /> Fixes facebook#47080 ## Changelog: [Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled Test Plan: Run the example app on an Android < 15 device. Rollback Plan: Reviewed By: cortinico Differential Revision: D77906644 Pulled By: alanleedev
7874a3f to
b67622d
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77906644 |
|
This pull request was successfully merged by @zoontek in 86994a6 When will my fix make it into a release? | How to file a pick request? |
This reverts commit 86994a6.
This reverts commit 86994a6.
This reverts commit 86994a6.
Summary: Commit 86994a6 breaks Android for API level 24. Since it has landed last week, we had CI red. reverting this change while we found a valid fix forward. ## Changelog: [Android][Changed] - Reverted fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled Pull Request resolved: #52732 Test Plan: GHA is green.: https://github.com/facebook/react-native/actions/runs/16414048087/job/46377878366?pr=52732 https://github.com/facebook/react-native/actions/runs/16414048087/job/46377878383?pr=52732 Reviewed By: cortinico, rshest Differential Revision: D78657920 Pulled By: cipolleschi fbshipit-source-id: 396a48c9aa7bde3109e25200fe2decc9977efda4
Summary: Pull Request resolved: facebook#52481 This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled. Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15): <img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" /> Using `WindowMetricsCalculator` from AndroidX: <img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" /> Fixes facebook#47080 ## Changelog: [Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled Pull Request resolved: facebook#47554 Test Plan: Run the example app on an Android < 15 device. Rollback Plan: Reviewed By: cortinico Differential Revision: D77906644 Pulled By: alanleedev fbshipit-source-id: 121cd6bc4133973f06b28eb9e79c9387ac7070a1
facebook#52732) Summary: Commit 86994a6 breaks Android for API level 24. Since it has landed last week, we had CI red. reverting this change while we found a valid fix forward. ## Changelog: [Android][Changed] - Reverted fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled Pull Request resolved: facebook#52732 Test Plan: GHA is green.: https://github.com/facebook/react-native/actions/runs/16414048087/job/46377878366?pr=52732 https://github.com/facebook/react-native/actions/runs/16414048087/job/46377878383?pr=52732 Reviewed By: cortinico, rshest Differential Revision: D78657920 Pulled By: cipolleschi fbshipit-source-id: 396a48c9aa7bde3109e25200fe2decc9977efda4
Summary:
This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the
DimensionsAPIwindowvalues on Android < 15, when edge-to-edge is enabled.Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15):
Using
WindowMetricsCalculatorfrom AndroidX:Fixes #47080
Changelog:
[Android] [Fixed] Fix
Dimensionswindowvalues on Android < 15 when edge-to-edge is enabledTest Plan:
Run the example app on an Android < 15 device.
Rollback Plan:
Differential Revision: D77906644
Pulled By: alanleedev