Reputation: 360
I am developing one camera application.I want my application should be in landscape and portrait only.If mobile changes to reverse landscape, application should remain in portrait or landscape mode.And one thing is if device rotated to landscape application should change to landscape, and device changes to portrait, application changes to portrait.
Upvotes: 1
Views: 468
Reputation: 5565
If you want Potrait Mode then:
<activity android:name=".ActivityName" android:screenOrientation="portrait" />
If you want Landscape Mode then:
<activity android:name=".ActivityName" android:screenOrientation="landscape" />
Upvotes: 1
Reputation: 807
You can use android:screenOrientation= locked on android manifest.
See: http://developer.android.com/guide/topics/manifest/activity-element.html for more info
Upvotes: 0