You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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();
}
});
The text was updated successfully, but these errors were encountered:
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();
}
});
The text was updated successfully, but these errors were encountered: