I am using a portrait (native) display in landscape mode by using setprop ro.sf.hwrotation 90 in KitKat and it is working well. The problem is that the screen momentarily flips/twists before going to the correct orientation when a USB keyboard is connected or disconnected. The aspect ratio is momentarily distorted as well (e.g. clock becomes an oval). The distortion only persists for a moment - but something is not correct.
This twist doesn't occur unless the ro.sf.hwrotation property is used - so I'm thinking that someplace in the Android source that needs to take it into account isn't.
Thanks in advance,
You can try handling the keyboard configuration change yourself, and that'll stop the activity from being recreated and causing the momentary distortion (see docs here)
Related
First of all, here are things I've done so far: (1) I handle screen rotation, orientation changes and Multi-Window related config changes inside my application. (2) I forbid all kinds of configChanges:
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout
Everything works just as intended, well until I enable screen-rotation from Android settings in Multi-Window mode.. When I do so, my app starts rotating inside its split-screen portion as if I enabled orientation, which I did not enable, hence my configChanges parameter above states.
Don't get me wrong, I don't mind the second app (in the side window) to rotate, yet I want to handle my own app rotation in my own portion of the split-screen..
I recon this problem might seem a bit strange, but I'm open for any suggestions. Maybe, you've got an idea or had a similar issue before.. any and all help is appreciated.
I am trying to create a custom device with Android and I have the device working well with at this point (looks good visually & with touch). The issue I am having is that the touchscreen does not always agree with the screen orientation. Here is the problem:
The device is set up as a tablet, and will be affixed to a table. But I want to make one version that can be used as a left-hand unit (with a small control section on the left) or a right-hand unit and have the splashscreen change with the unit orientation. My LCD allows me to flip it 180 degrees using a switch, and I can read in that signal on my processor. The problem is that when I flip the screen with the switch, the touch sensor does not come with. Where would I change this configuration? I have access to the AOSP source code, and can build custom ROMS, so that is not an issue.
Now you may also respond that I could use the accellerometer, but the issue with that is that I would see a couple of seconds of the screen being upside-down, and then the reorientation. I need it to boot up as flawlessly in the correct orientation as possible.
What I need: A place in the source code or a setting that I can change in Android that would let me change the touch screen orientation without changing the screen orientation.
Thank you for your help!
The shortcuts for putting the Android emulator into landscape view do not work for me. Searching through related questions I see a lot of information about an old bug where the emulator would change orientations, but the rotation event would not be triggered. However, this is different, my emulator won't even change orientation (the keyboard shortcuts do nothing).
Attempting to turn off the portrait orientation in the emulator manager also does nothing, nor do any of the QEMU options relating to the display size (eg. I can't start it in fullscreen or change the geometry of the display at all).
This happens with both a 4.4 image or a 5.0 image. Keyoard support is on and works in general.
Is this a known issue, or is there some trick to getting newer versions of the Android Emulator to change orientation at all?
this is my first post so please correct me if I do any mistake regarding rules :-)
Heres my problem:
I am trying to set a fixed screen rotation for all Apps on an Android device
(not just my App). I searched a lot but found only solutions for single Apps.
I had the following Ideas:
1) Use the API ==> seems not possible
2) Change accelerometer values ==> seems not possible
3) virtually open a hardware keyboard ==> seems not possible
Turning off autorotation keeps all Apps in portrait mode, but I would like all
Apps to be in landscape mode.
Can anybody help me please?
At least for Android 4.2. (Nexus 7) you can hold device in landscape mode and then disable autorotation. Afterwards all apps work in landscape mode.
I'm a Mac user. I just installed the Eclipse and Android SDK. However, I realised that when my emulator rotates from portrait to landscape, the view of the application does not turn back when I press fn+ctrl+11/12 again but the emulator does. This does not occur only on my app, it also occurs on the device program such as setting.
Does anyone know the reason behind it ? Please help. Thanks a lot.
You are probably running into a bug that occurs when the emulator runs certain versions of Android OS. For links, see my answer here: Android 2.3 emulator orientation changes
because each rotation is 90 degrees, the first time you tilt it, it will go sideways (90 deg). what you're experiencing when you tilt it again is that the emulator(phone) is now upside-down (180 deg). even normal android devices do not display portrait mode upside-down. tilt it two more times to go back to 0 degrees portrait.