How to set orientation for activities ?

by   SJRANJAN

You can set orientations through AndroidManifest.xml file.

To set activity as Landscape...

android:screenOrientation="landscape"

Example:

<activity android:name=".SomeActivityName"
              android:label="@string/app_name"
              android:screenOrientation="landscape">

To set activity as Portrait...

android:screenOrientation="portrait"

Example:

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

Search

You may like...

How to change title of activity in Android ?

How to change title of activity in Android ?...


How to close ( Exit ) application on a button Click ?

How to close ( Exit ) application on a button Click ?...