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

Java Development

Reply
Contributor
kknautiyal
Posts: 15
Registered: ‎06-14-2011
My Device: 8520

App orientation issue

Hello,

 

In my app, I've fixed the app orientation to portrait mode. Its working fine but some of OS 7 and OS 6 devices display app orientation in landscape mode automatically.  Please suggest, how to fix this issue.

 

 

Thanks

Kewal

Developer
shaan_softwaredvlpr
Posts: 172
Registered: ‎01-17-2011
My Device: 9500 series

Re: App orientation issue

Please provide code, 

By Which we can find where are you going Wrong.

 

This code is used to restrict app in portrait mode

 

Ui.getUiEngineInstance().setAcceptableDirections(Display.DIRECTION_PORTRAIT);

 

 

Developer
pradeep_ch
Posts: 543
Registered: ‎12-23-2010
My Device: Z10

Re: App orientation issue

Use this,

 

Ui.getUiEngineInstance().setAcceptableDirections(Display.DIRECTION_NORTH);

 

 

Thanks.