Reputation: 1120
I'm using eclipse and I'm trying to figure out how to only allow a Portrait state be used during game play. I can't seem to find any options in eclipse to block the Landscape state.
I'd appreciate any assistance. I know it's probably a simple matter, but I can't seem to find it and I've not tried to do this before.
Thanks in advance.
Upvotes: 2
Views: 38
Reputation: 3442
In your AndroidManifest
file you can achieve this. You will add the android:screenOrientation
tag in your application declaration. Something like this
<application
android:icon="@drawable/logo"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:screenOrientation="portrait" > //HERE
<activity
android:name="com.test.SomeActivity"
android:label="@string/app_name" >
You can change that to landscape as well. This attribute can also be applied to individual activities instead of the whole application if you need that.
Upvotes: 2
Reputation: 7915
In the activity tags of your manifest file, add this:
android:screenOrientation="portrait"
Upvotes: 2