android TV NEXBOX A95X screen orientation portrait - android

I want to display my screen always in portrait mode on TV(NEXBOX A95X). I have set android:screenOrientation="portrait" to Activity on Manifest file. But it is working on mobile devices but not working on TVs. It is displaying horizontally in landscape mode. Any help will be appreciated. Thanks in advance!

Related

Android 13 - Landscape orientation are not actually landscape

In android-13 devices, am facing issue with playing video within the exoplayer. when user rotates them devices video player will be set to full screen. but in this case rotating device can changes orientation but showing app in portrait mode only (whole page)
Expected: rotating device should fill the screen as like Android 12 and previous versions
Tried
android:name=".ui.fullscreenVideo.VideoPlayerActivity"
android:exported="true"
android:configChanges="orientation"
android:screenOrientation="userLandscape"
but issue not fixed (
When user rotate them mobile, video activity also want to get rotated like previous android 12 and below versions
The problem is Android-13, showing portrait screen mode in landscape orientation
We are experiencing same issue in android 13 android:screenOrientation="locked"
I changed the setting to default/nosensor to resolve the issue currently.
android:name=".MainActivity"
android:exported="false"
android:configChanges="orientation|screenSize|keyboard|locale|keyboardHidden|uiModel"
android:screenOrientation="locked"

Landscape include layout in Portrait orientation

I'm currently developing an app that will show a physical representation of an ID card, i have this view as an XML file on both landscape and portrait mode.
My question is: is it possible to have the phone in Portrait mode and use only this layout as an include in landscape mode? The goal is to have a nice elegant ID Card shown on the screen like the picture here. Thank you.
Edit: so in other words I need to use a LANDSCAPE resource while being on PORTRAIT mode.
You can add android:screenOrientation="portrait" to your Activity in the manifest and this will lock the Activity in portrait mode.

App Crash after Screen Orientation

I have an app with layout, layout-land, layout-sw600dp-land and layout-sw720-land.
My app works normally with bigger screen but with smaller screen phones the app will crash when I rotate the phone.
I used this code in my manifest and solve the crashing problem:
android:configChanges="orientation|screenSize"
App works fine with rotate, but its just show the layout and any land layouts will not show up.
what to do?
Thanks in advance

My tablet's orientation is 180 degrees (upside is down)?

When developing the app it looks great on my virtual devices.
But when trying it on my real tablet it displays the whole app upside down!
Can I change the orientation by 180 degrees somewhere in the android settings?
Can I change my code slightly to display the app in 180 degrees?
Please note that I am using api8 (android 2.2)
You can set the screen orientation of the activity in the AndroidManifest.xml file
e.g
<activity
.
.
android:screenOrientation="reverseLandscape"
/>
You can use other options see the documentation
I realize the question is about 2.2, however this valuable piece of code (2.3+) handles both orientations of landscape inside your manifest:
android:screenOrientation="sensorLandscape"

froyo's universal rotation and my landscape only app

My app is set in landscape only mode thanks to an attribute in my manifest file, but with froyo came universal rotation and a problem. It will force the screen to landscape but if the user is holding the phone upside down my app will appear upside down. Is there a way for me to set my app to only rotate when the user has their phone orientented in both landscape positions?
I have one app in landscape mode and put in manifest this attribute:
android:screenOrientation="landscape"
Put this into activity and works fine for me (Froyo 2.2 Nexus One)
... By the way sorry for my english

Categories

Resources