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
New Contributor
Cris987
Posts: 2
Registered: ‎01-17-2011
My Device: Playbook

Switching Playbook Orientation in WebWorks Application

I can't seem to switch orientations in WebWorks application in the simulator. How can I do it?

 

Also, how can I know the current orientation using JS or detect any orientation changes?

Developer
ryanmc
Posts: 71
Registered: ‎02-04-2011
My Device: Blackberry Bold & Pearl

Re: Switching Playbook Orientation in WebWorks Application

To change screen orientation you swipe towards the middle of the screen from the bottom right corner of the bevil, this works fine in the web browser however it doesn't work at all in an aplication - you can rotate it by swiping upwards from the botom bevil to go into the aplication switching mode and then changing orientation but all this does is distort the aplication that is loaded, it doesn't fire a orientation change event it just changes stretches the aplication horifically.

 

Are webworks aplications going to be stuck in landscape mode or do we have to wait for a new version of the simulator / the actual tablet before we can test portrait mode? 

 

Of course you can test it in the web browser and get an aproxomation of how it looks / will work.

New Contributor
Cris987
Posts: 2
Registered: ‎01-17-2011
My Device: Playbook

Re: Switching Playbook Orientation in WebWorks Application

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Switching Playbook Orientation in WebWorks Application

WebWorks applications do support orientation change.. they are just working on getting the plumbing built into the emulator to do this.

 

You would then get the orientation on the window.orientation object and trap the onorientationchange event if you want to detect when it happens.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Regular Contributor
bobbyboy1999
Posts: 59
Registered: ‎03-07-2011
My Device: Not Specified

Re: Switching Playbook Orientation in WebWorks Application

Window.orientation object is not listed in the "full" list of Playbook supported Javascript APIs.  Can we still use it somehow in developing Playbook Webworks apps?

 

 

 

 

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Switching Playbook Orientation in WebWorks Application

Which "full" list of Playbook supported APIs are you referring to?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Regular Contributor
bobbyboy1999
Posts: 59
Registered: ‎03-07-2011
My Device: Not Specified

Re: Switching Playbook Orientation in WebWorks Application

Hi Tim,

 

The list of APIs is at:

 

http://www.blackberry.com/developers/docs/webworks/api/playbook/

 

My understanding from the Webinar was that these were the only APIs supported by the Playbook.  I would be quite pleased to learn otherwise, obviously.

 

Regular Contributor
bobbyboy1999
Posts: 59
Registered: ‎03-07-2011
My Device: Not Specified

Re: Switching Playbook Orientation in WebWorks Application

Hello again,

 

I think my question has been answered, inadvertently, through another question I posed in a different thread:

 

http://supportforums.blackberry.com/t5/Web-Development/BlackBerry-WebWorks-SDK-for-PlayBook-Webcast-...

 

Sorry.  I wasn't trying to cross post.