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.

Dimensions not correctly set after locking to portrait

See original GitHub issue

Currently I am calling Orientation.lockToPortrait on app load, then for a single component i’m calling lockToLandscape and upon leaving that component again calling lockToPortrait. However when i console log out Dimensions.get('window'); after the last lockToPortrait the width is still larger than the height. Any idea if there is a fix for this?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
austinthetacocommented, Jun 13, 2019

@wonday It is changed after app start. Upon app launch with lockToPortrait the Dimensions.get('window') returns correct portrait dimensions. Then when i call lockToLandscape Dimensions.get('window') return the correct landscape dimensions. the issue is after this when i call lockToPortrait again but the dimensions don’t change.

2reactions
dellertcommented, Jul 7, 2019

same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Before changing orientation from portrait to landscape
The widget dimensions change once I change the orientation in the build preview. I have set the form orientation to 'Both' and have...
Read more >
iOS 13/13.1 Bug with Autorotation | Apple Developer Forums
iOS 13/13.1 autorotation seems to be behave differently than iOS 12. For instance, my app allows user to lock interface orientation to portrait...
Read more >
Managing screen orientation - Web APIs - MDN Web Docs
If application A is locked to landscape and application B is locked to portrait , switching from application A to B or B...
Read more >
React-Native + Flex not responding to orientation change
We just need to implement this. It's better to store dimension in state variable and update on each orientation change so that re-rendering...
Read more >
Screen Orientation - W3C
For example, a user agent might not support locking to the "portrait-secondary" or "landscape-secondary" orientations.
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