GoogleChromeLabs / GoogleChromeLabs/bubblewrap

Disable Screen Rotation

Open
#840 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.1k
Forks
319
PR merge metrics
No merged PRs in 30d

Description

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".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.