question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detect window dimension change when virtual buttons are show/hidden on samsung s8

See original GitHub issue

Is this a bug report?

Yes

Have you read the Bugs section of the Contributing to React Native Guide?

Yes

Environment

  1. react-native -v:0.44.2
  2. node -v:7.4.0
  3. npm -v:4.0.0
  4. yarn --version (if you use Yarn):

Then, specify:

  1. Target Platform (e.g. iOS, Android):Android
  2. Development Operating System (e.g. macOS Sierra, Windows 10):Linux mint
  3. 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.

ezgif com-video-to-gif

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:open
  • Created 6 years ago
  • Reactions:52
  • Comments:31 (5 by maintainers)

github_iconTop GitHub Comments

37reactions
nhducitcommented, Jan 15, 2018

This issue haven’t been fixed. Please keep it open Stale bot

17reactions
wmoneckecommented, May 26, 2020

Still happening on RN 0.59.8

Read more comments on GitHub >

github_iconTop Results From Across the Web

android detect Samsung Galaxy S8 navigation bar hide or ...
For the Samsung phones (i.e, S8, S9, etc) you can detect if the navigation bar is showing via listening to a Samsung event....
Read more >
Customize the Navigation bar on your Galaxy phone or tablet
You can customize the Navigation bar that appears on the bottom of your phone or tablet's screen to make it easier to find...
Read more >
Navigation Bar Settings on Galaxy device | Samsung Philippines
When you turn on the screen, the soft buttons will appear on the navigation bar at the bottom of the screen. · Be...
Read more >
[Galaxy S8/S8+]How to show the home button and navigation ...
FAQ for Samsung Mobile Phone. Find more about '[Galaxy S8/S8+]How to show the home button and navigation bar?' with Samsung Support.
Read more >
How to change Keyboard Settings in Samsung Galaxy S8+ ...
Related Questions. How to change the color of the button of the screen in Samsung Galaxy S8+? · How to change the Font...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found