简体   繁体   中英

How to set screen orientation to portrait mode on Android TV App?

I have an Android TV App , that needs to change its activity to portrait mode. Already set the android:screenOrientation="portrait" but no success.

Note: On the emulator it did work at Android 6 but not at Android 9.

I also tried it programatically but it was the same result: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

I also found out that there is an App ( Set Orientation App ) which can rotate the Systems Screen completely.

How can I achieve the same result on my Android TV App?

My intention is to switch the Screen orientation during runtime on specific conditions.

If you have root access on the tv, you can edit probs to change it to the screen orientation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM