Locking Screen Orientation

suggest change

To lock the screen orientation of any activity in your Android application, set the android:screenOrientation property of that <activity> in AndroidManifest.xml:

<activity
    android:name="com.techblogon.screenorientationexample.MainActivity"
    android:screenOrientation="portrait"
    android:label="@string/app_name" >
    <!-- ... -->
</activity>

That activity is then forced to stay in portrait mode.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents