Android landscape orientation. Emulator doesn't respond - android

screenshot http://sdl1.4pda.ru/1862622/image/jpeg/portrait.JPG?00169e49ceae42635003442300000000de9e7e77de71680003e699507907d6e9
screenshot http://sdl4.4pda.ru/1862623/image/jpeg/Landscape_mode.JPG?00169e49ceae42635003442e00000000e2f203d397cc0154fd07c1a111773c1a
Good day!
I've faced with a problem - Android emulator doesn't respond on orientation change!
Version 2.3.3.
You can see home screen on the picture. In my app I have 2 folder - layout, layout-land - and I expect Android to do turn for me (setContentView(R.layout.main) should chose right layout), as it was said in the book. Both files have name main.xml

yes some times this is the problem with Android emulator 2.3.3
To again get portrait mode click on the home and click you app icon again.
This is the only problem in emulator and coming to mobile it wont happen like this

Related

My android emulator screen is not recognizing the layout-land

I have created a copy of the layout folder and renamed it as layout-land. In the eclipse; the screen is showing in the landscape mode.
But when I try to rotate the screen in emulator using CTRL+F11; then it rotates the screen instead of showing in the landscape mode.
How do I fix this problem so that the emulator shows the screen in landscape mode? Can someone please help me ??
I have also changed the background color in the layout-land; but the emulator doesn't recognize the color too .. I think it's not recognizing my layout-land at all. How do I fix this?
I'll add this links as an answer to the question (for anyone who faced this problem as well):
http://code.google.com/p/android/issues/detail?id=13189
Android 2.3 emulator orientation changes
why does the gingerbread emulator orientation get stuck in apps?
There is a bug in Android 2.3, and thus I was unable to rotate the screen. But when I tried in Android 4.1 it works.

How do I get the Android tablet emulator to be right-side up?

I just downloaded the Android 3.0 SDK and booted up an emulator with it. I rotated the emulator to portrait mode with Ctrl-F12 and then opened and the activity that was build with 2.2 and the whole emulator is upside down ( as in the emulator is upside down, home buttons are on the top and screen is upside down) . Is there a way to rotate it the other way or am I missing something entirely? ( I have already tried doing Ctrl-F11 or the Num pad, same result)
open your androidmanifest file. In the application tab select an activity. Then scroll down to screen orientation and select sensorPortait in the drop-down menu. It's only available from api-level 9 (2.3.1) and higher.
Well , there can be one of the 2 cases ,
1 - I misinterpreted your question , in which case i am extremely sorry
2 - The problem has been solved in the latest download of the android 3.0 Sdk(i just downloaded 1 right now )
Here , i am posting the screen shot of my AVD running 3.0 and a 2.2 Hello World Activity .
I had this same issue when I was forcing portrait by setting screen orientation to "portrait" in the manifest file. When I made my app support rotation, and switched screen orientation back to "unspecified" the issue went away.
If you don't want to support rotation, just change the manifest while you test, and before you open the app, rotate the emulator so it opens in portrait.
I encountered this problem on running the Android SDK (Eclipse) on an Intel (Core i5) Mac. I was able to fix it by disabling the "Use Host GPU" option for the AVD.
I had the same problem, in my case when I rotated the emulator to portrait, the "desktop" would show correct. However the app would run upside down.
(This worked for v4 Ice Cream)
So, in portrait mode, in the bottom right corner of the emulator, select the settings and set "Auto-rotate screen" to OFF.
Run the app now and it will show correct.
Some of the emulator targets like 4.4 (API level 19) and 2.3 have a bug. Change your emulator to target version 4.2 or 4.3 and try to change the orientation or try to disable hardware keyboard.
The same thing just happened to me with a KitKat emulator whenever I setup the AVD with a default orientation of Landscape. Switching the default to Portrait fixed the problem.
The easiest way to tackle that problem is to just flip the display of your host system.
On the Mac you can do this in System Preferences > Display on Windows there is a keyboard shortcut: ctrl + alt + arrow key. (see here: https://superuser.com/questions/554589/how-can-i-horizontally-flip-invert-my-monitor-not-rotate and here: http://osxdaily.com/2010/12/28/rotate-mac-screen-orientation/)
And if you have a standalone trackpad you can just turn it around physically to have your mouse pointer move naturally.

honeycomb emulator reversed screen in portrait

I just tested an app developed for Android 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).
If however I rotate the emulator to portrait mode, the screen is shown reversed by 180°. That means, what should be on top is on the bottom of the screen and the other way round. It's not only the app, but also the Android status bar.
If I exit (background) the app, the issue disappears.
I've tested the app on several Phones and emulators, this never happened with Android 2. Can't test on a real Honeycomb device yet.
what version of android 2 are you developing, 2.1, 2.2, 2.3.1 or 2.3.3.
If it's 2.3.1 and higher then open your androidmanifest file. In the application tab select an activity. Then scroll down to screen orientation and select sensorPortait in the drop-down menu.
was fixed by changing the properties of config.ini in
%SYSTEM_DRIVE%\Users\%USER_NAME%\.android\avd\YOUR_AVD_NAME_HERE
form
skin.path=1280x720
to
skin.path=720x1280
hope that'd help you
You can rotate emulator screen by pressing 7 or 9 on numpad (windows)

Android 3.0 emulator only showing a fraction of the app when loaded

So I've searched for an answer but found nothing. Basically, whenever I run a simple little menu app for android tablets using the eclipse android emulator 3.0, only about 1/6th of the app is shown (the top center piece, if the tablet is held landscape.) I've done tutorials using the 2.2 emulator and they work just fine, but whenever I launch the 3.0, the app (and only the app - the android home runs fine) just doesn't appear. When I look at it in the main.xml layout folder, the graphical layout shows it exactly the way I want it to appear.
Is this a problem with the emulator? This can't be a common problem, otherwise I'm sure I would have found a solution by now, but there must be some switch or something that I'm not seeing that's making the app appear as if it were running on a phone and not a tablet.
Do you have a low resolution set for your 3.0 AVD? If you run the AVD Manager, what resolution does it show?

why does the gingerbread emulator orientation get stuck in apps?

At first I thought this was a problem with my app, but it seems to be happening in any app (though interestingly, not the home screen) in the gingerbread emulator.
To replicate my issue, open eclipse and fire up the android emulator for gingerbread (I'm using the "Google APIs - API Level 9" as my target)
So the procedure to duplicate once the emulator loads is
press LCtrl-F11 to shift orientation to landscape, then again to switch to portrait
Result:
In the homescreen:
The view rotates to landscape, and then back to portrait, as expected
In any app (i've tried browser, calculator, maps, and the app i'm currently working on):
the view rotates to landscape, and then nothing, it stays in landscape even the emulator is displaying the phone in landscape mode (see below)
Has anyone else had this issue, or have I installed the emulator in some incorrect way - this hasn't been an issue with any of the previous emulators
This is a bug with the Android emulator running 2.3.x. Bug is already acknowledged here
Actually, I have run into that problem occasionally before, though it does seem to get progressively worse with each passing tools release. There is nothing wrong with your installation or how you are using the program, AFAIK. You might try using Ctrl-F12 to switch back rather than Ctrl-F11 and see if that improves matters. I think the problem may stem from the emulator trying to emulate four-way orientation, but that is just a guess.
I just got stuck with the same problem in my own application. The app always stays in lanscape mode after using the camera. The only workaround I found is to click on the home button (emulator changes to portrait mode) and then click again on my application to get back to it also in portrait mode.
Did anybody report that bug already?
(Gingerbread emulator, Eclipse 3.5.x, Android Development Tools 8.0.1.v201012062107-82219)

Categories

Resources