Possible Duplicate:
How can I set Orientation Fixed for all activities
I would like to lock my screen orientation for my app. I mean that all Activities must have the same landscape
orientation. I don't want to add android:screenOrientation="portrait"
in the manifest for all activities. Is there any other way? thanks
Regards
setRequestedOrientation(ActivityInfo. SCREEN_ORIENTATION_LANDSCAPE); Called on an activity, will lock it to landscape.
You have two options for achieving the result.
e.g.
<activity
android:name=".Some_Act"
android:label="@string/app_name"
android:screenOrientation="portrait" >
</activity>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With