Skip to content

Conversation

@zoontek
Copy link

@zoontek zoontek commented Jul 14, 2025

No description provided.

zoontek added 2 commits July 7, 2025 23:30
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:

Differential Revision: D77906644

Pulled By: alanleedev
Copy link
Owner

@alanleedev alanleedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

@alanleedev alanleedev merged commit 7874a3f into alanleedev:export-D77906644 Jul 15, 2025
1 check passed
@zoontek zoontek deleted the export-D77906644 branch August 13, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants