Comments (6)
only video page can Landscape?
you can lockToPortrait() at other page and
unlockAllOrientations() when enter video page
lockToPortrait() again when leave video page
from react-native-orientation-locker.
@wonday I see this issue is closed, but I am experiencing it as a bug in this new package for Android.
In the previous .react-native-orientation
package, the event listeners would not emit the orientation changes if the phone auto-rotate was set to off by the user. Now in this new package, it does
This is unfortunate because I could really use this feature that has been added to this package, getting the device orientation even when we have locked the orientation via JS code. But I also need to be able to disregard all orientation logic if the user has locked the auto-rotate status of their device.
EDIT: I am mistaken, the previous library doesn't do this. But this issue is still valid, I need a way to disregard all orientation logic if the user has selected auto-rotate to be false
from react-native-orientation-locker.
I tried this approach with react-native-orientation
package and did no work, I wanted to validate that this approach will work with this package before making the change.
thanks @wonday
from react-native-orientation-locker.
This is a real issue. Can we reopen it?
from react-native-orientation-locker.
merged and released to v1.0.22
from react-native-orientation-locker.
This is not a valid solution or rather to be precise, this solution is incomplete.
Consider device is locked to portrait mode
If login is implemented in portrait mode only and the rest of the pages supports all the orientations,
Inside Login Page ComponentDidMount, call the method to lock to portrait mode
Inside Login Page ComponentDidUnmount, that is when moving into the next pages of the application,
// Inside Component Did Mount
Orientation.getAutoRotateState(s => {
if (s) Orientation.unlockAllOrientations();
});
After entering the page, unlock all the orientations. there is no event emitter to listen to changes in autorotate state.
Instead of bringing the previous functionality where events are not emitted when autorotate is off, this solution provided is incomplete.
from react-native-orientation-locker.
Related Issues (20)
- OrientationType is not matching exported constants
- Feature-Suggestion: Migrate iOS Part to Swift
- Support new React Native new architecture (TurboModules/Fabric)
- Landscape mode on real device shows half screen but works well on emulator IOS HOT 1
- 横屏的时候,缺了一块儿 HOT 2
- Landscape orientaion is not working on iphone 7 HOT 4
- App was working normally, when I ran it again this error occurred, what would be a possible solution? HOT 7
- IOS 12 crashing when calling Orientation.lockToLandscape() HOT 2
- Here is Kotlin code for Android installation HOT 4
- package for RN 0.73.1 ? HOT 2
- Task: react-native-orientation-locker: compileDebugJavaWithJavac FAILED HOT 7
- getAutoRotateState always returning `true` on iOS and `false` on Android HOT 1
- Screen still rotates with Auto-Rotate Disabled on Android Devices Above SDK 30 HOT 2
- When switching from portrait to landscape then slight space left using version 1.5.0. Also cannot update HOT 1
- plorer
- BUG IN CLIENT OF UIKIT: Setting UIDevice.orientation is not supported. Please use UIWindowScene.requestGeometryUpdate(_:) HOT 4
- Getting "undefined" from all imports
- Screen rerender issue after using this library
- OpenSSL-Universal and Privacy Manifest / Apple Privacy Policy Compliance HOT 3
- Android sdk 34 is not supported [Android 14] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-orientation-locker.