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.

Window dimensions doesn't change for android split screen

See original GitHub issue

Description

After upgrading react-native from 0.62.2 to 0.63.3 I’ve met an issue that when I use split screen on my physical android device the dimensions for window doesn’t change. It remains the same if I open the app in fullscreen, or split it with other app so it takes 1/2 or 2/3 or 1/3 of the screen space. I cannot tell exactly what react-native version got this broken, but I did test it both on 0.62.2 and 0.63.3 versions once again, so I am confident about this being an issue on latest react-native version

React Native version:

System: OS: Windows 10 10.0.19041 CPU: (4) x64 Intel® Core™ i5-2400 CPU @ 3.10GHz Memory: 2.51 GB / 9.98 GB Binaries: Node: 14.5.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 28, 29 Build Tools: 28.0.3, 29.0.2, 29.0.3 System Images: android-21 | Google APIs ARM EABI v7a, android-21 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64 Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio: Not Found Languages: Java: Not Found Python: Not Found npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 react-native-windows: Not Found

Steps To Reproduce

I’ve left the code example down here, copy it and paste in App component of newly initializated react-native project on 0.63.3 version and try to open the app in fullscreen and split-screen, see the window height being the same(vertical split-screen).

Expected Results

Dimensions.get(‘window’).height AND useWindowDimensions hook must return different results for app being resized by using split-screen, but it returns the same value on & on, but it works as expected in 0.62.2

Snack, code example, screenshot, or link to a repository:

  console.log('manual get height:', Dimensions.get('window').height);
  const {height} = useWindowDimensions();
  console.log('useWindowDimensions hook height:', height);

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

3reactions
bigcupcoffeecommented, Apr 3, 2022

Bump: persists on 0.68.0 Additionally noting that console.logs from example are generally stopping when changing split-screen height, like nothing re-renders(although scrollview gets proper height and scrolls to the end regardless). I’m definitely lacking some knowledge about changes in latest releases, would love if someone corrected me

2reactions
bigcupcoffeecommented, Oct 19, 2021

Bump: issue persists on 0.66.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't resize Split Screen anymore on Android 12
Try resizing the "Display size" setting. If it's set larger than a particular size, split screen windows can't be resized.
Read more >
Activity doesn't restart on orientation change when window ...
The activity restarts properly while changing orientation when the window size is 1/2 or 1/3 the display size in multi window mode. I...
Read more >
Can't adjust split screen size
Having a strange issue with adjusting the split screen size when using two apps. When I begin the split screen I start with...
Read more >
Multi-window support
Multi-window mode enables multiple apps to share the same screen simultaneously. Apps can be side by side or one above the other (split-screen...
Read more >
How to Split Screen on Android
You can adjust the size of the windows by adjusting the divider in the middle and moving it up or down on the...
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