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.
<activity
android:label="@string/app_name"
android:name="HelloWorld"
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)
Hey nice way of sharing about android. Keep Sharing… Thanks!
ReplyDeleteVery informative, keep posting such good articles, it really helps to know about things.
ReplyDelete