I am wondering how to disable the vertical layout such that the application starts and runs in horizontal layout only.
Asked
Active
Viewed 595 times
0
-
possible duplicate of [How do you create an app that only allows horizontal orientation?](http://stackoverflow.com/questions/4233612/how-do-you-create-an-app-that-only-allows-horizontal-orientation) and also of [Android, landscape only orientation?](http://stackoverflow.com/questions/8408197/android-landscape-only-orientation) – Ted Hopp Oct 27 '13 at 16:48
3 Answers
2
Add this android:screenOrientation="landscape"
to your <activity>
tag in the manifest for all your activity that you want to be in landscape.
<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="landscape"/>

Amit Gupta
- 8,914
- 1
- 25
- 33
1
In Manifest XML file under each <activity>
tag specify the orientation as horizontal.

Naresh
- 3,174
- 1
- 17
- 22
1
Add
android:screenOrientation="landscape"
as an attribute to the relevant <activity>
tag(s) in the manifest.

Ted Hopp
- 232,168
- 48
- 399
- 521