Saturday, April 21, 2012

Keep Screen in Portrait Mode

By default, your app will run in Portrait mode.  And you might opt to keep it that way, but would also rotate to Landscape mode if the phone it handled sideways.

To keep it in Portrait mode, open your AndroidManifest.xml then add the highlighted text below.

   android:screenOrientation="portrait" >
< /activity>

But if you are creating an Android game, chances are you wanted to default it in Landscape and stay that way. If so, just change portrait to landscape.

(via Creek Codes)


  1. Hey nice way of sharing about android. Keep Sharing… Thanks!

  2. Very informative, keep posting such good articles, it really helps to know about things.