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.