Detect window dimension change when virtual buttons are show/hidden on samsung s8
See original GitHub issueIs this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
:0.44.2node -v
:7.4.0npm -v
:4.0.0yarn --version
(if you use Yarn):
Then, specify:
- Target Platform (e.g. iOS, Android):Android
- Development Operating System (e.g. macOS Sierra, Windows 10):Linux mint
- Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant):
Steps to Reproduce
(Write your steps here:)
1.use Dimensions.get(“window”).height 2. On the samsung s8 the virtual home/back button can be hidden so i will toggle this on or of and a layout change is detected but the value is not changed but is when i change device orientation
Expected Behavior
(Write what you thought would happen.)
I expect the window height to change from 692 to 716 on my device anyway whenever the buttons are hidden.
Actual Behavior
The height should be changing to match the window height change when this is hidden. If i use the nativeEvent.layout the correct height value is shown but using this means the height is always undefined on first render which is not ideal.
Reproducible Demo
I don’t think a snack example will be any good as i cant reproduce this issue on it but i will add a gif showing the issue on my device.
As you can see above when the orientation changes the height changes to 360 but when i toggle the virtual home buttons the height is not changing samsung s8 screen resolution is 360x740 pixels if that is helpful.
Sorry a gif was the only way i could think to show this as a actual demo, Wouldn’t show anything without the code on the correct device.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:52
- Comments:31 (5 by maintainers)
This issue haven’t been fixed. Please keep it open Stale bot
Still happening on RN 0.59.8