2

how to force an app into landscape only or portrait only? I want to app locked into the orientation of user choices.

Thanks a lot for sharing!!

Hadi Sharifi
  • 1,497
  • 5
  • 18
  • 28

2 Answers2

6
 <activity android:name="Intro"
            android:screenOrientation="portrait"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="com.gmaninc.package.INTRO" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

one of the following in each activity in the manifest

android:screenOrientation="portrait"
android:screenOrientation="landscape"
Technivorous
  • 1,682
  • 2
  • 16
  • 22
-1

Follow below steps to achieve what you wanted to do..

  1. Open Android Manifest file.
  2. Set Orientation to Portrait or Landscape

that's it..

Prasanthi
  • 19
  • 7