Files
react-native/packages
Peter AbbondanzoandFacebook GitHub Bot cc485ccf7d Fix status bar height calculation for all cutout sizes (#44697)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44697

Google has discouraged attempting to read the `status_bar_height` resource [since 2017](https://youtu.be/_mGDMVRO3iE?si=qGQd7gLa_qTmfLGL&t=1079). With the introduction of display cutouts there can be a mismatch between the resource value and the true status bar size (and issues like [this one](https://github.com/facebook/react-native/issues/33612) popped up). The recommended approach is to instead call `getInsets` with the proper status bar and navigation flags provided by `WindowInsets`. On older APIs where `getInsets` is not supported, we have access to `systemWindowInsetTop`.

Changelog:
[Android][Fixed] - Fixed StatusBar.currentHeight calculations to honor all cutout sizes

Reviewed By: cipolleschi, alanleedev

Differential Revision: D57878119

fbshipit-source-id: 9fadd33d5f9b617a70a052c98dbd53fd29281650
2024-05-31 08:57:41 -07:00
..
2024-05-30 07:40:36 -07:00
2024-04-24 12:27:04 -07:00