Skip to content Skip to sidebar Skip to footer

How To Force An Android App Into Landscape Only Or Portrait Only?

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!!

Solution 1:

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

one of the following in each activity in the manifest

android:screenOrientation="portrait"android:screenOrientation="landscape"

Solution 2:

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..

Post a Comment for "How To Force An Android App Into Landscape Only Or Portrait Only?"