A framework for building native applications using React
Fix Dimensions window values on Android < 15 (#52481)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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 https://github.com/facebook/react-native/issues/47080 ## Changelog: [Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled Pull Request resolved: https://github.com/facebook/react-native/pull/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
M
Mathieu Acthernoene committed
86994a6e22415dbb5c5348c3cede1f9942a894ea
Parent: b795d61
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 7/16/2025, 4:15:43 PM