I am trying to determine the vertical display size of my Blackberry Storm 2.
I know my device has a height of 480 pixels. I am trying to get this value in my code, but if the virtual keyboard is shown, I get a value of 480 - (virtual keyboard height) . Is there any function for determining the real display height on any device (with or without a keyboard with the virtual keyboard turned on or off).
Im also opening RIM classes:
I get these values ββwith a hidden virtual keyboard:
Display.getWidth(); //360 Display.getHeight(); //480 UiApplication.getUiApplication().getActiveScreen().getContentWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getContentHeight(); //480 UiApplication.getUiApplication().getActiveScreen().getWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getHeight(); //480 UiApplication.getUiApplication().getActiveScreen().getVirtualWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getVirtualHeight(); //480 UiApplication.getUiApplication().getActiveScreen().getVisibleWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getVisibleHeight(); //480
I get these values ββwith the virtual keyboard shown:
Display.getWidth(); //360 Display.getHeight(); //248 UiApplication.getUiApplication().getActiveScreen().getContentWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getContentHeight(); //248 UiApplication.getUiApplication().getActiveScreen().getWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getHeight(); //248 UiApplication.getUiApplication().getActiveScreen().getVirtualWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getVirtualHeight(); //248 UiApplication.getUiApplication().getActiveScreen().getVisibleWidth(); //360 UiApplication.getUiApplication().getActiveScreen().getVisibleHeight(); //248
Is there a way to determine the actual height of the screen?
screen screen-resolution blackberry
Vlad Tsepelev
source share