08-24-2011 02:58 AM
Hi all,
I have an app with so many screens out of which, 1 screen is like main screen of the app, and i don't want that screen to shift to landscape mode though i rotate the device, it should remain in the portrait mode always..
Is there a way to do this!!!
Please let me knw!!!
Thnx..
08-24-2011 03:39 AM
08-24-2011 03:45 AM
08-24-2011 04:28 AM
Hey thnx,
But this is not working in my code,
I am using OS 5.0 and 6.0,
If i use the above code then it shows all the screens in portrait mode, but i just want to show a single screen in portrait mode and all other should behave normally depending on directions..
If u have any code sample in which this is working then please let me know.
Thnx..
08-24-2011 04:58 AM
Hi,
add below single line code in constructor of that screen which you want to fix.
Ui.getUiEngineInstance().setAcceptableDirections(D
I hope this will slove your issue
08-24-2011 05:07 AM
I have already tried this but this is also having the same problem, it reflects for all the screens and all the screens are shown in portrait mode..
08-24-2011 05:17 AM
can we set PORTRAIT mode for a particular screen using that screens object or instance??
08-24-2011 06:09 AM
08-24-2011 06:14 AM
ohhk.. will try.. thnx!!!
08-24-2011 06:25 AM
Hi PP,
I tried above thing,
In one class (in which i want portrait mode), i wrote Ui.getUiEngineInstance().setAcceptableDirections(
and in another class i wrote
Ui.getUiEngineInstance().setAcceptableDirections(D
But when it goes to that class it sets the mode for whole app, that means when i push 1st screen the PORTRAIT mode is set for all screens and when i push the second screen the LANDSCAPE mode is set for all screens i.e for whole app..
nyways, thnx for your help, If you find anything please let mo know..
thnx a lot..