chadh0130
Apple Fan
Profile
Posts: 352
Reg: Nov 05, 2011
Rhode Island
4,020
03/21/13 08:57 PM (12 years ago)

Locking android orientation to portrait

I have a splash image and video player background image that look great in portrait mode only but when in landscape mode,the images look god awful. Does anyone know how to lock an android orientation to portrait mode ony?
 
Suvinay pawa
buzztouch Evangelist
Profile
Posts: 599
Reg: Aug 01, 2012
location unknow...
9,890
like
03/21/13 09:44 PM (12 years ago)
Yes..You can do this by editing the manifest in this way : Open AndroidManifest.xml and look for this line towards the end of the manifest, where the manifest lists all of your plugins: Replace that line with this line--by doing this, you are inserting, 'android:screenOrientation="portrait"' into the line: <activity android:name=".Sp_flashlight" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation" android:screenOrientation="portrait"> </activity> .Sp_flashlight is the plugin you want to lock...
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
03/22/13 05:35 AM (12 years ago)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.