Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone
Accepted Solution

Locking the application orientation in BB smartphone

Hi,

Is there any way to lock the screen to portrait (for smartphone).

Well, then <rimSmiley Surprisedrientation mode="portrait"/>....  have any support on phone. 

Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Locking the application orientation in BB smartphone

Hi 

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Locking the application orientation in BB smartphone

Hi jeff,

Good info, However now i just added the below code to achieve my target.

 

 

 

  int directions = net.rim.device.api.system.Display.DIRECTION_PORTRAIT; net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections(directions);

 

 

 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Tips-Quirks-and-Solutions/td-p/4...