froyo's universal rotation and my landscape only app - android

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

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"

android TV NEXBOX A95X screen orientation portrait

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!

Samsung Tab S2 not respecting manifest screenOrientation

I have an Activity that is meant to be displayed in landscape. Ideally I want to support either direction of landscape. In my manifest I've set this on my Activity:
android:screenOrientation="sensorLandscape"
Which has worked fine in all my experience in the past. But this device seems to decide sometimes that portrait orientation is allowed. It will rotate to all 4 orientations (landscape/reverseLandscape, and portrait/reversePortrait).
If I set it like this:
android:screenOrientation="landscape"
it works correctly. Also if I disable screen rotation then it works correctly. However both of these options leave me with no reverseLandscape.
I've also tried requesting the orientation to be set in Java code:
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
This does not seem to make any difference in the behavior.
Is this a known issue on Samsung devices? and is there any workaround to get the device to respect my sensorLandscape orientation setting?

Android Layout Folder for Devices/Tablets which are always in Landscape

I'm developing an android app for phones and tablets.
I want all of the devices to use portrait layout. I made a 'layout' folder for it. But, there are some X number of devices which are always in landscape mode. Probably, large tablets. So, I made a 'layout-land' folder too.
Which folder I need to add so that X amount devices will always display landscape layout only, while other devices will always display portrait layout?
Main requirement is to have only portrait layouts displayed. But, display Landscape layout when device itself is in landscape mode(default). I am talking about devices that display drawer in landscape mode, and the ones that open landscape layout of apps only.
Is this automatic?
I have android:screenOrientation="portrait" in manifest.
I can't test this as I don't have a tablet/large device.
I have already looked at this question and other similar questions.
Add the below line in your onCreate() method before setContentView()
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORT‌​RAIT);

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

Categories

Resources