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 Developer
Posts: 22
Registered: ‎03-26-2011
My Device: RIM 850

How do you lock the orientation in a WebWorks playbook app?

[ Edited ]

I'm trying to lock the app to a landscape or portait only view. The simulator is really buggy and distorts the app when i change the view. It even trashes the built in browser so I don't know what is the correct way to do this.

 

What do I need to add to the config.xml file?

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.3" rim:header="RIM-Widget:rim/widget">
  <name>Landscape App Name</name>
  <description></description>
  <author rim:copyright="2011">n/a</author>
  <icon rim:hover="false" src="icon.png"/>
  <icon rim:hover="true" src="icon.png"/>
  <content src="index.html"/>
</widget>

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

Re: How do you lock the orientation in a WebWorks playbook app?

Hi There,

 

There are a few other posts in the forum around this topic.  It isn't supported in Beta 3 but it is coming.  A search at the top of the forum should give you the answers you are looking for.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
Posts: 22
Registered: ‎03-26-2011
My Device: RIM 850

Re: How do you lock the orientation in a WebWorks playbook app?

[ Edited ]

If its not supported, does that mean its not supported for the playbook or not supported on the simulator?

 

Should I use landscape and portrait specific CSS, perhaps show an alert that says it only works in landscape?  If so, how should I test it? The simulator doesn't refresh the view when the orientation is changed.

 

Thanks!

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

Re: How do you lock the orientation in a WebWorks playbook app?

Our WebWorks Beta 3 does not support locking orientation in general.... simulator or device.

 

Yes you should likely have portrait and landscape CSS.  As far as a bug in the simulator around not refreshing your content properly, I'm not sure of how to get around that other than exiting the application and entering it in either landscape or portrait instead of switching on the fly until the simulator supports it.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
Posts: 22
Registered: ‎03-26-2011
My Device: RIM 850

Re: How do you lock the orientation in a WebWorks playbook app?

The simulator is reporting that the screen width and height are 1280 x 768. I see documentation that the playbook is 1024 x 600.

 

Is this correct?

Highlighted
Developer
Posts: 39
Registered: ‎03-01-2011
My Device: PlayBook
My Carrier: AT&T

Re: How do you lock the orientation in a WebWorks playbook app?

i'm not sure by any means, but the added pixels may take into account the black bars around the perimeter.