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
Regular Contributor
Megha_9_dec
Posts: 56
Registered: ‎08-21-2012
My Device: BB10
My Carrier: RIM

Changing orientation of application dynamically.

[ Edited ]

Hi everyone,

In my application I want one screen to be set as landscape oriented. It's one of the Tab of the TabbedPane. Presently I'm using following snippet on Tab triggered.

 

Tab {
id: tab
title: "Tab 3"
imageSource: "asset:///images/icon_active.png"
onTriggered: {
OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.DisplayLandscape;
}
}

 

the orientation of the application gets changed to landscape but the UI gets disturbed (stretched).

 

IMAG0075.jpg

 

 

 

 

 

 

 

 

Untitled.png

 

 

Is what the QML preview shows: landscape mode.

 

 

 

If I set the orientation of app to Landscape from bar discriptor file then the UI stays fine. But that's not what I want. Where am I doing wrong? Is there any other way to change the orientation dynamically??

 

 

 

Thanks in advance.

 

Please use plain text.
Developer
ekke
Posts: 1,458
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Changing orientation of application dynamically.

there are still some scenarios where changing from Landscape to Portrait or back stretches or distorts the UI.

Best way is to make a small example reproducable and submit at Issue Tracker

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.