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)
Related
I've just deployed the "first app" demo from Android Studio on a Nexus 10 emulator and on my physical Nexus 10 (API 22 / Lollipop 5.1).
On the emulator, when I change the orientation, the app rotates, but on my physical device it doesn't, it's stuck in landscape.
I've checked VLC rotates fine on my physical device for example, so the sensor is not the problem.
If you want to change your screen orientation based on sensors use the below code
activityContext.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
Thats what VLC does rotates screen based on Sensors.
Is there any way to tell Eclipse to launch the Android Emulator (4.1.2) in landscape mode?
My reason for asking is that changing the orientation (using one of the keyboard shortcuts) after starting the emulator does not seem to affect the home and other system screens, although it works fine with apps.
I am aware of the -skin command line option, but it has been deprecated.
I suppose that I could also create a custom device in Android Virtual Device Manager but I'd rather use the Nexus 7 preset.
Try:
ctrl+fn+F11 in Mac to change the landscape to portrait and vice versa.
left-ctrl+F11 in Windows 7.
ctrl+F11 in Linux.
This can be achieved by creating a new AVD using custom resolution.
Simply fire up the AVD manager, create new AVD, choose your target and tick the resolution and add a resolution fit for landscape, like 480 x 640.
This is a known bug when using the 4.4 emulator. You can rotate the emulator using the ctrl+F11 shortcuts mentioned above, or using the 9 key on your keypad.
Once you have the emulator in landscape, open the camera app in the emulator, which will rearrange all the controls to where they should be in landscape mode. You can then launch your app from eclipse/android studio and it will properly appear in landscape mode.
Instead of creating a new AVD you can use the current AVD you're using and just Edit it (from AVD manager) and then you can change the option of "Orientation" between Portrait and Landscape.
I recently started creating a mobile application on the google nexus 7. I have previously tested this application on the kindle fire and both portrait and landscape mode worked on all screens but when I upload the application onto the nexus the application always stays in portrait.
Has anyone run into this or know why the nexus only shows my application in portrait mode?
Is your device rotation lock turned on? It's in the quick pull down menu.
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 just tested an app developed for Android 2.2 on the 3.2 emulator. The app supports only portrait mode, thus in default landscape mode of the emulator it's rotated by 90° (as on Android 2.2).
If however I rotate the emulator to portrait mode, the screen is shown completely reversed by 180°. That means, what should be on top is on the bottom of the screen. It's not only the app, but also the Android status bar but, if I exit the app, the issue disappears.
I've tested the app on several Phones and emulators, this never happened with Android 2.2 or 2.3 it just happens with 3.0, 3.1 and 3.2. Can't test on a real Tablet device yet. Thanks.
remove this from your activity in manifest file
android:screenOrientation="portrait"