react-native-orientation-locker
react-native-orientation-locker copied to clipboard
When switching from portrait to landscape then slight space left using version 1.5.0. Also cannot update
How to fix this space when switching from portrait to landscape then getting this space if landscape-left then left side space is there or if landscape-right then right side space is there.
useDeviceOrientationChange((ori) => { setOrientation(ori); // This will trigger a re-render if (ori === "LANDSCAPE-RIGHT" || ori === "LANDSCAPE-LEFT") { if (state.index === 1) { Orientation.unlockAllOrientations(); } } else if (ori === "UNKNOWN" || ori === "FACE-UP") { // No action needed for these cases null; } else if (ori === "PORTRAIT-UPSIDEDOWN") { Orientation.lockToPortrait(); } else { // Lock to portrait if not in landscape mode or unknown Orientation.lockToPortrait(); } });
Hello guys , Any solution for this?
I have same issue. Is there any solution??
+1