Android Orientation Changes Locking Screen Orientation

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


If you want to lock the screen orientation change of any screen (activity) of your android application you just need to set the android:screenOrientation property of an <activity> within the AndroidManifest.xml:

    android:label="@string/app_name" >
    <!-- ... -->

Now that activity is forced to always be displayed in "portrait" mode.

Got any Android Question?