Skip to content

Allow portrait mode on mobile devices, lock TVs to landscape - #175

Open
disclosurez wants to merge 1 commit into
Davidona:masterfrom
disclosurez:orientation-fix
Open

Allow portrait mode on mobile devices, lock TVs to landscape#175
disclosurez wants to merge 1 commit into
Davidona:masterfrom
disclosurez:orientation-fix

Conversation

@disclosurez

Copy link
Copy Markdown
Contributor

Changes android:screenOrientation from "landscape" to "unspecified" in the manifest so phones and tablets can rotate freely.

For TV devices, MainActivity locks orientation to landscape at runtime via requestedOrientation = SCREEN_ORIENTATION_SENSOR_LANDSCAPE. This ensures the TV UI, which is designed for landscape, never accidentally rotates.

Only 2 files changed:

  • app/src/main/AndroidManifest.xml — landscape → unspecified
  • app/src/main/java/.../MainActivity.kt — TV runtime orientation lock

Changed AndroidManifest screenOrientation from 'landscape' to 'unspecified',
and added runtime orientation lock in MainActivity for TV devices only.
Phones/tablets can freely rotate, while TVs remain locked to landscape.
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

Successfully merging this pull request may close these issues.

1 participant