Disable landscape mode
To disable the rotation in your android APP you have to place the right landscape mode.
Place android:screenOrientation=”portrait” between the activity tags.
Example:
Android < 2.3
1 2 3 4 5 |
<activity android:name="ShapeView" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:screenOrientation="portrait"> </activity> |
Android > 2.3
1 2 3 4 5 |
<activity android:name="ShapeView" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:screenOrientation="sensorPortrait"> </activity> |
Leave a Reply