Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 58

Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
07/21/14 09:38 AM (9 years ago)

Lock Orientation to Portrait in Android

Hi I want to lock the orientation to portrait only for my Android app. Does anyone know how?
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
07/21/14 09:42 AM (9 years ago)
In the manifest: android:screenOrientation="portrait" android:configChanges="keyboardHidden" Will force portrait :)
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/21/14 09:43 AM (9 years ago)
Where abouts do I add this code? Also did you see that Kittsy solved the icon/logo action bar issue?
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
07/21/14 09:44 AM (9 years ago)
^^ Just overwrite the existing lines: BT_activity_start (android:configChanges="keyboardHidden|orientation|screenSize" ) and BT_activity_host (android:configChanges="keyboardHidden|orientation|screenSize" )
 
rburns50
buzztouch Evangelist
Profile
Posts: 168
Reg: May 12, 2014
Bilston - Engla...
9,130
like
07/21/14 09:53 AM (9 years ago)
haha - awesome, just added the icon hide to my ever growing raft of docs!!!
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/21/14 10:18 AM (9 years ago)
Thanks!
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
07/21/14 02:22 PM (9 years ago)
nice.im bad at taking notes.I want to make an android "code snippet" pdf for bt.ive been going through alot of forum posts and bookmarking them which isnt really that efficient for me
 
Shorewalk
Lost but trying
Profile
Posts: 54
Reg: Nov 06, 2012
location unknow...
10,040
like
07/21/14 02:55 PM (9 years ago)
I had just thought to ask the same question ... the solution came faster than it ... Thanks
 

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.