Reputation: 825
I had an application of timer and my app should always be in landscape mode. In manifest, I had used:
<activity android:name=".MActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar"
android:configChanges="keyboardHidden|orientation">
But sometimes, when I switch from background to foreground, it first appears in portrait mode and then resizes to landscape mode. What's happening here?
Thanks in advance.
Upvotes: 0
Views: 212
Reputation: 3809
Do you have the same situation if you paste this line in every of your activities (in the onCreate):
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
Upvotes: 1
Reputation: 21919
use android:configChanges="keyboard|keyboardHidden"
not the orientation for this attribute
Upvotes: 0