Wednesday, September 30, 2009

Maintain Layout Orientation in Android Applications

Here is a one-liner statement in your manifest xml (AndroidManifest.xml) to maintain your preferred portrait layout orientation. Simply add this line in the XML:

android:screenOrientation="portrait"
Otherwise, you may also use "landscape" as the value.
android:screenOrientation="landscape"

Further information is available at the Android Developers Website

0 comments:

Post a Comment