How to set or How to fixed Android Screen Orientation Android Studio Tutorial
How to change android screen orientation in your app building is a common question for android entry level developer. There are nine types of android screen Orientation. Each orientation works with default, sensor and user mode. And only one mode which is unspecified in properties. If you don't use any android screen orientation properties then it will works as unspecified by default. In order learn how to change android app screen orientation then follow the following steps.
(a) android:screenOrientation="portrait"
(b) android:screenOrientation="landscape"
(c) android:screenOrientation="reversePortrait"
(d) android:screenOrientation="sensorPortrait"
(e) android:screenOrientation="userPortrait"
(f) android:screenOrientation="reverselandscape"
(g) android:screenOrientation="userlandscape"
(h) android:screenOrientation="unspecified"
(i) android:screenOrientation="sensorlandscape"
Step 01: First go to the AndroidMainfest.xml file in your android application project.
Step 02: No find your targeted activity. Every activity start with
<activity android:name=".MainActivity">
Step 03: Add your screen orientation attribute among the starting tag of your activity like below.
(a) android:screenOrientation="portrait"
(b) android:screenOrientation="landscape"
(c) android:screenOrientation="reversePortrait"
(d) android:screenOrientation="sensorPortrait"
(e) android:screenOrientation="userPortrait"
(f) android:screenOrientation="reverselandscape"
(g) android:screenOrientation="userlandscape"
(h) android:screenOrientation="unspecified"
(i) android:screenOrientation="sensorlandscape"
Step 01: First go to the AndroidMainfest.xml file in your android application project.
Step 02: No find your targeted activity. Every activity start with
<activity android:name=".MainActivity">
Step 03: Add your screen orientation attribute among the starting tag of your activity like below.
<activity android:name=".MainActivity"
android:screenOrientation="portrait">
Comments
Post a Comment