Reputation: 3278
Hello I have a strange bug, when I want to trigger the orientation change on the Galaxy Nexus(4.0.4), it simply doesn't jump into the onConfigurationChanged(Configuration)
function.
On the HTC Desire(4.0.4) it works without any issues with the same code. And even on an emulator with 720p it works. I tried to update to Android 4.1, but I still have the same problem.
Does anyone have the same problems or any solutions?
Upvotes: 5
Views: 4081
Reputation: 628
If you have called setRequestedOrientation(..)
in the activity before, the onConfigurationChanged(Configuration)
will not be triggered by the system auto-detect of rotation.
Upvotes: 0
Reputation: 111
screenSize
flag on Android 4.X needed.
Try another android compiler builder.
Upvotes: 0
Reputation: 5278
In the manifest, int the <activity>
tag, add android:configChanges="orientation"
. This tells the system that your activity will handle orientation changes by itself, hence the onConfigurationChanged() will be triggered.
Upvotes: 0