I'm using LWUIT 1.4. I want to lock the orientation for landscape. So, I used
Display.getInstance().isPortrait();
But it says can't find symbol for isPortrait()
?
Can anyone tell why this method not available in LWUIT1.4?
I'm using LWUIT 1.4. I want to lock the orientation for landscape. So, I used
Display.getInstance().isPortrait();
But it says can't find symbol for isPortrait()
?
Can anyone tell why this method not available in LWUIT1.4?
First...are you importing the correct Display
? Is important that you don't import the lcdui Display
.
Second...the correct method is lockOrientation(boolean portrait) . You must write Display.getInstace().lockOrientation(true);
. I think is true
value...try to do that.
Well i have made it working by getting screen height and width .
if width is less than height just discarding it and if above allowing it
implemented same kind of scenario in Lwuit as well as Blackberry UIApplication and its working