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

Native Development

Reply
Contributor
punto
Posts: 18
Registered: ‎03-19-2012
My Device: playbook
My Carrier: movistar

Orientation ignored when launching from icon?

Hi.

 

I'm porting an iOS game to bb10 using the 10_0_9_1673 SDK on a bb10 dev alpha phone. I have this for orientation on bar-descriptor.xml:

 

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

Everything works well when I run the game from the IDE, but when I launch the game using the icon from the phone menu, it always launches in portrait mode. Is this a known bug? Is there a way to force this orientation programatically? I tried using navigator_rotation_lock(true); but it made no difference.


Thanks.

 

Please use plain text.
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: Orientation ignored when launching from icon?

Is the splash screen you are using providing in your BAR also landscape?

Are you handling navigator rotation events?

Please use plain text.
Developer
strobejb
Posts: 267
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: Orientation ignored when launching from icon?

You can specify:

<initialWindow>
<autoOrients>true</autoOrients>
</initialWindow>

and remove the <aspectRatio> element

Please use plain text.