Reputation: 2731
I thought this is an easy problem, but I just can't find an answer anywhere!
On my Emulator (SDK 9 on Windows 7), many built-in applications can't respond correctly to orientation change. They include: browser(!), alarm clock, calculator, Api Demos. They can correctly change to landscape mode, but when the emulator is turned back to portrait, they stay in landscape mode. However, a few other built-in applications are fine, they are Home screen, launcher, and phone dialer.
I tried the following to see what's going on:
@Override
public void onCreate(Bundle savedInstanceState) {
....
boolean bLandscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
....
}
What I saw was: When the emulator is turned to landsacpe mode, it returned the correct result. But when the emulator turns back, it still says it's in landscape mode!
Is it just me? Does anybody have any insight on this? Thank you, as always!
Upvotes: 2
Views: 1225
Reputation: 29463
This is a known bug with the emulator. This will not happen on a real device and has nothing to do with the way any of these apps were coded.
The bug writeup is here
for some more info see here
Upvotes: 2