How can I disable landscape mode for some of the views in my Android app?
+1
A:
Are you essentially trying to disable the auto-rotate feature. Try setting your preferred orientation in your portrait views?
adam
2009-02-24 15:37:41
+22
A:
Add android:screenOrientation="portrait"
to the activity in the AndroidManifest.xml. For example:
<activity android:name=".SomeActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
Yoni Samlan
2009-02-24 17:04:33
A:
I was not aware of the AndroidManifest.xml file switch until reading this post, so in my apps have have used this instead:
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); // Fixed Portrait orientation
R.
Rich
2010-10-18 14:53:15