Via : OpenAndroid.in
Tags : #Source_Code, #Tips__Tricks, #Tutorial
Orginal Post: How to show an Activity in Landscape or Portrait Mode only
Show Activity in Portrait or Landscape mode only
In Android, some times we need to show an Activity/Screen in portrait or Landscape mode only. Specially while developing game, we want a particular game to be played in Landscape or Portfrait mode only.
for this we need to set the android:screenOrientation attribute in manifest
To show the Screen/Activity in Landscape mode only
<activity android:name=".MainActivity"
android:screenOrientation="landscape"/>
To show the Screen/Activity in Portrait mode only.
<activity android:name=".MainActivity"
android:screenOrientation="portrait"/>
Via : OpenAndroid.in
Tags : #Source_Code, #Tips__Tricks, #Tutorial
Orginal Post: How to show an Activity in Landscape or Portrait Mode only
0 comments:
Post a Comment