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
mikeo007
Posts: 28
Registered: ‎11-17-2009
My Device: 9900
My Carrier: ATT

Only allow rotation on certain screens?

I've got a Webworks app where I'd like to enable rotation, but only on certain screens.

Is there a method to achieve this using webworks?

Please use plain text.
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: Only allow rotation on certain screens?

If by screens you mean Q10 vs. Z10 just release slightly different releases for each model.
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
Developer
mikeo007
Posts: 28
Registered: ‎11-17-2009
My Device: 9900
My Carrier: ATT

Re: Only allow rotation on certain screens?

Sorry, I meant different screens within the same app.

 

Ie. On screen "norotate.htm" the screen will not rotate when the user turns the phone.

But on screen "yesrotate.htm" the screen will rotate when the user turns the phone.

Please use plain text.
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: Only allow rotation on certain screens?

I've never used it but you might find this of use

https://developer.blackberry.com/html5/api/blackberry.app.html#.lockOrientation
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Only allow rotation on certain screens?

That's the API I was going to recommend.  When each screen is displayed, your application can choose to lock orientation in a specific layout.

 

Here's a functional sample that mimendoza wrote:

 

https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Orientation

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.