My app target 2.2 and later and want to support orientation only on portrait and reverse portrait. and the problem is i can't declare
android:screenOrientation="reversePortrait"
in manifest as it is only available from api level 9.
How is it possible to do this by supporting android 2.2 and later.
According to this post,
How to detect exact orientation of device in Froyo?
it is not possible to use portrait mode with reversed API 8.
Related
I want to install an Android OS to an Odroid-XU4 device and connect it to a vertical touchscreen through HDMI. I want the content be displayed as portrait and fit the screen.
I installed 4.4.4, 6.0 (Cyanogenmod 13.0) and 7.1(Lineage 14.1) android images to the Odroid. By default, all of them display the screen as landscape , so I must configure the OS to get it displayed as portrait.
I first used AndroidUtility (a tool included in the OS image) and set HDMI orientation as portrait. The screen is displayed great (portrait and full screen) with the 4.4.4 OS image. Unfortunately, 4.4.4 OS doesn't work for me because the device has to be a COSU and this needs 6.0 or above OS version.
But using AndroidUtility , the screen is displayed like this in both 6.0 and 7.1 OSs:
After looking it over forums, blogs... I found out that the solution should be editting these lines in OS build.prop config file:
persist.demo.hdmirotation=portrait
ro.sf.hwrotation=270 (I have tried 90 too)
windowsmgr.support_rotation_270=true
Doing this, 7.1 OS version looks as portait and fills all the screen... but it's displayed upside down.
And 6.0 OS version looks not only turned, but also cropped:
How can I get it displayed as portrait and full-screen?
I had this same issue using LineageOS from here
(Source)
I ran the update to the most recent release from the ODROID Utility and it changed the "HDMI Landscape / HDMI Portrait 90+270" to a straight 0, 90, 180, 270. To change it required a reboot.
(Fetched)
All Android devices manages the screen sizes in the same way, so that has nothing to do with your android odroid, unless you have forced to be in landscape, and your monitor source is with a portrait orientation.
You just need to adjust your screen display monitor source orientation usually is using your screen menu, `
Menu->Display->(Horizontal or Vertical)
I want to reverse the orientation of my device.
I tried using the option ro.sf.hwrotation 180 but it rotates the display but doesn't rotate the touch.
I have found many leads through patches but all are for froyo or Gingerbread. I need it for JellyBean(4.1.2).
Please Help
http://developer.android.com/guide/topics/manifest/activity-element.html#screen
"reversePortrait" Portrait orientation in the opposite direction from normal portrait. Added in API level 9.
I set up the Android SDK in Eclipse on Linux and I am trying some AVDs. I have created a 2.3.3 (API 10) device and a 4.1 (API 16) device. Both use the default values provided in the dialog box for creation.
When I run the 2.3.3 AVD and press ctrl + F11 to change orientation, the orientation of the screen changes from portrait to landscape and the keyboard moves below the screen BUT all activities (mine as well as the standard apps) continue to be drawn in portrait mode. The configuration change does not seem to be registered and handled.
The 4.1 AVD works as expected: the screen orientation changes and the running Activities are terminated and redrawn in layout-land.
Is this a bug or a configuration issue that I can fix?
Yes it's a bug: Issue 13189: Orientation does not change from landscape to portrait on Emulator on 2.3 It's was fixed for AVD images post 2.3.3, but it seems the fix was never backported to 2.3.x
The work around is to add Keyboard support as a hardware property to Gingerbread AVDs, though as noted in the bug report, this isn't perfect.
I have an activity that requests a landscape mode.
However with some tablets, the reverseLandscape should be used.
That's why I'd like to use the sensorLandscape screen orientation, but it is only available for API 9+.
Mine is level 7, and if I change it I will loose a big part of users.
How is it possible to do this feature with API level 7 please ?
Thanks...
I have an application not really designed for the tablets. However it works sufficiently well in zoom to fill screen mode. Is there a way to force an application to only be displayed in "zoom to fill screen" mode on android?
See the document on Screen Compatibility Mode.
An application can also explicitly declare that it does not support large screens such that screen compatibility mode is always enabled and the user cannot disable it.
And more detail:
If your application is functionally broken when resized for large screens and you want to force users into screen compatibility mode (rather than simply providing the option), you can use the android:largestWidthLimitDp attribute:
<supports-screens android:largestWidthLimitDp="320" />
Note that this is only when targeting 3.2 or higher. The zooming screen compatibility mode is only available on 3.2 and higher.