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
kperson
Posts: 4
Registered: ‎02-06-2011
My Device: Not Specified

Screen Orientation using Webworks for the Playbook

I was wondering if anyone knows how to detect the screen orientation using Webworks for the Playbook.  For handheld devices, I believe this is accomplished using window.orientation; however, window.orientation returns 0 in the emulator (http://supportforums.blackberry.com/t5/Web-Development/Detect-screen-orientation-changes-using-JavaS...

 

Also, the speaker in one of the webcast mentions that you can not lock the screen orientation to portrait or landscape in Webworks, but also mentions that one of their partners has done so.  This was a little ambiguous.  Any clarification on this issue would be much appreciated!

 

Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Screen Orientation using Webworks for the Playbook

 

You can switch orientation of the sim by swiping from the bottom right bevel towards the center of the screen.

 

I believe in the Webcast the comment was referring to the Smartphone version of the WebWorks SDK, where it is possible to develop a custom Java/JavaScript extension that allows you to access and modify the underlying BrowerField object & configuration.  This is not currently possible on PlayBook.

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
malaluanj
Posts: 5
Registered: ‎01-30-2011
My Device: Not Specified

Re: Screen Orientation using Webworks for the Playbook

Hi,

 

It seems that when I'm on a portrait orientation and opens an application, the simulator reverts back to the landscape orientation. Is this the correct behavior?

 

 

Regards,

Jay Joel Malaluan

Developer
ProfHawking
Posts: 46
Registered: ‎02-16-2011
My Device: 8300>9000>9700>9900>Z10

Re: Screen Orientation using Webworks for the Playbook

[ Edited ]

I have the same issue - the home window and browser apps work in portrait, but mine does not.

If the screen is portrait when you open the app, it reverts to landscape.

When in the app, dragging from the bottom right no longer rotates the screen.

 

Does anyone have a solution to this?

 

UPDATE

Did a bit of searching, this bug has been confirmed but is still open.

https://www.blackberry.com/jira/browse/TABLET-70

 

I had to bodge my portrait app screenshots using chrome and a bit of photoshop