Dimensions not correctly set after locking to portrait
See original GitHub issueCurrently 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:
- Created 4 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@wonday It is changed after app start. Upon app launch with
lockToPortrait
theDimensions.get('window')
returns correct portrait dimensions. Then when i calllockToLandscape
Dimensions.get('window')
return the correct landscape dimensions. the issue is after this when i calllockToPortrait
again but the dimensions don’t change.same issue