how to implement blackberry application that will work on both mode (portrait and landscape)

209 views Asked by At

i m working with one blackberry application os 5.0 and letter , that is working fine in portrait Mode . when i swich device to landscape Mode , layout of that perticular screen switch into portrait to landscape and that time right side of the screen display White color .

so how to handle the application in landscape mode with Design and all Manager ?

how to get device current mode (landscape and portrait )?

please guide me its argent ...

1

There are 1 answers

0
Remy Lebeau On

Use Display.getOrientation() to get the current device orientation. If you do custom drawing, you may also need to use Display.getDirection() to determine which edge of the display is "on top". Use UiEngineInstance.setAcceptableDirections() to specify which orientations/directions you want to support. If the orientation changes, your Screen's sublayout() method gets called again, which gives you oppurtunity to reposition your controls appropriately for the new orientation.