Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When switching from portrait to landscape then slight space left using version 1.5.0. Also cannot update #289

Open
Asharuddin-90 opened this issue Feb 28, 2024 · 1 comment

Comments

@Asharuddin-90
Copy link

Asharuddin-90 commented Feb 28, 2024

media_20240228_125155_7607707875810082966
media_20240228_125155_7613300781130159606
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();
}
});

@RuFang-21
Copy link

Hello guys ,
Any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants