Friday, 6 August 2010

How to disable the auto-rotate feature?

In some case, we want our app run in portrait mode only, so we have to disable the auto-rotate feature. Simple add the statement android:screenOrientation="portrait" in your AndroidManifest.xml, inside <activity>

<activity android:name=".MyActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">

No comments:

Post a Comment