Android Prevent screen rotation

I have seen lots of Android application no matter how you rotate the screen, the screen always in portrait/landscape mode.  I am wondering how to achieve it on my application, because some of the applications do look better if it does not rotate the screen.
Here it is the solution:
On the “AndroidManifest.xml” file
You can add android:screenOrientation=”portrait” to tell the application to prevent screen rotation.
< activity android:name=”.ShareChiWai”
android:label=”@string/app_name” android:configChanges=”orientation”
android:screenOrientation=”portrait” >
In this case it will make the application portrait
Hope you find it useful

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.