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

Disable Screen Rotation #840

Open
hannandesai opened this issue Jan 19, 2024 · 1 comment
Open

Disable Screen Rotation #840

hannandesai opened this issue Jan 19, 2024 · 1 comment

Comments

@hannandesai
Copy link

Hello,

I want to disable app to rotate even if devices's screen rotation is on, I tried below code to disable screen rotation, still it rotates the app in latest android devices when device's screen rotation is on.

  1. In LauncherActivity.java I set orientation to portrait.
  2. In AndroidManifest.xml I set android:screenOrientation="portrait"

Still it rotates when auto rotation is enabled in device.

Please advice what can I do to disable screen rotation, I tried all other options for orientation like "nosensor", "sensotPortrait", "locked".

@shunxing
Copy link

shunxing commented Aug 7, 2024

Is there any update on that ?

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