By default an Activity support both Portrait and Landscape mode. On changing the orientation of the device, view rotates accordingly. However in certain apps we may want to limit the orientation to Portrait or Landscape and we can do the same by specifying the android attribute screenOrientation to portrait or landscape as part of the Activity definition:


<activity android:name=".activity.AudioPlayerScreen"
android:label="Audio Player" android:screenOrientation="portrait"]]>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>

This will set the orientation of Audio Player Screen to Portrait mode only.<!>