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

10K Developer Commitment

Reply
Developer
mamdohreda
Posts: 73
Registered: ‎10-31-2011
My Device: Q10
My Carrier: etisalat

landscape mode

please I want to put it on landscape mode only and how can I put that on xml to be landscape only I put this is on xml but it’s open on portrait

 

<initialWindow>
     <aspectRatio>landscape</aspectRatio>
     <autoOrients>false</autoOrients>
     <systemChrome>none</systemChrome>
     <transparent>true</transparent>
 </initialWindow>

please help to open my Game on lanscape only ..i use webworks....

Please use plain text.
BlackBerry Development Advisor
klajili
Posts: 36
Registered: ‎01-26-2012
My Device: 9900
My Carrier: T-Mobile DE

Re: landscape mode

[ Edited ]

That snippet is from the native docs, right? That doesn't apply for WebWorks.

Here is how you define layout orientation in a webworks app:

https://developer.blackberry.com/html5/documentation/param_element.html


<feature id="blackberry.app.orientation">

<param name="mode" value="landscape" />

</feature>

Please use plain text.
Developer
mamdohreda
Posts: 73
Registered: ‎10-31-2011
My Device: Q10
My Carrier: etisalat

Re: landscape mode

[ Edited ]

i try what on link of webworks that before but app open on portorail not lanscape 


<widget xmlns="http://www.w3.org/ns/widgets"

        xmlns:rim="http://www.blackberry.com/ns/widgets"

        version="1.0.0.0" id="playbookfea844489c998262984eca881c2d5f24" xml:lang="en">
 
  <author href="http://www.example.com/"
          rim:copyright="Copyright 1998-2012 My Corp">Enwany</author>
 
  <name>Rubix Cube</name>
 
  <description>
    Do you like puzzles? Then try to solve the Rubik's cube online!
  </description>

         
  <rim:category name="games"/>   
 
  <rim:smileytongue:ermissions>
    <rim:smileytongue:ermit>access_shared</rim:smileytongue:ermit>
    <rim:smileytongue:ermit>read_geolocation</rim:smileytongue:ermit>
    <rim:smileytongue:ermit>use_camera</rim:smileytongue:ermit>
  </rim:smileytongue:ermissions>
 
  <icon src="icon.png"/>
 
  <content src="index.swf"/>
 
  <feature id="blackberry.ui.dialog"/>
 
  <access uri="http://www.somedomain.com" subdomains="true">
    <feature id="blackberry.app.event"/>
    <feature id="blackberry.invoke"/>
  </access>
 <feature id="enable-flash"/>
<feature id="blackberry.app.orientation">
    <param name="mode" value="landscape" />
</feature>
</widget>

Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: landscape mode

What version of the WebWorks SDK are you using?  Are you building for PlayBook or BlackBerry 10?  There is a slightly different way to specify the orientation in both SDK (the spec changed to support the open standard):

 

For PlayBook:

<rim:orientation mode="landscape" />

 

 

For BlackBerry 10:

<feature id="blackberry.app.orientation">
    <param name="mode" value="landscape" />
</feature>

 

All of this is detailed in the documentation:

https://developer.blackberry.com/html5/documentation/config_doc_elements.html

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.
Developer
mamdohreda
Posts: 73
Registered: ‎10-31-2011
My Device: Q10
My Carrier: etisalat

Re: landscape mode

thanks now it's working . i am using BB10 webworks ..but it work good now

Please use plain text.