-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Dimension.get('window').height returns screen height, not a device window height in RN v0.71.7 #42621
Comments
|
|
@AnshulRaghav Hi, could you please provide an reproducer? |
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days. |
@Thiago-Santos-SI The problem with the issue is that, it is only reproducible on certain android emulators: Below is a code snippet in which we are trying to place a yellow ball absolute position from the bottom of a View whose height is equal to that of Dimension window height:
The yellow ball is positioned relative to the View whose height is equal to window height. Output of the code on android emulator Nexus 7 API 32 Yellow ball hidden behind navigation bar. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
There's a strange behaviour that's been observed on some(not all) android devices that whenever using
Dimensions.get('window').height
, it is returning screen height since the Android Navigation Bar is also added to the total height of of the component.Android Properties:
In the following image, the navigation bar height is also added.
React Native Component snippet:
Steps to reproduce
Install packages:
React Native Version
0.71.7
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
NA
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: