public class AppUtility
extends java.lang.Object
AppUtility
provides utility methods related to the screen
parameters.
Modifier and Type | Field and Description |
---|---|
static AppUtility |
instance
Global instance of AppUtility to access all members.
|
Constructor and Description |
---|
AppUtility() |
Modifier and Type | Method and Description |
---|---|
int |
calculateHeight(javax.microedition.lcdui.Image image,
int newWidth) |
int |
calculateWidth(javax.microedition.lcdui.Image image,
int newHeight) |
int |
getRetinaScale()
Returns the retina scale for iOS devices.
|
int |
getScreenHeight()
Deprecated.
|
int |
getScreenPPI()
Returns the current screen PPI.
|
int |
getScreenWidth()
Deprecated.
|
boolean |
isEmpty(java.lang.String s)
Checks if the delivered String is null or empty.
|
boolean |
isLandscapeMode() |
boolean |
isRunningOnTablet() |
public static AppUtility instance
public int getRetinaScale()
public int getScreenWidth()
public int getScreenHeight()
public int getScreenPPI()
public boolean isLandscapeMode()
public boolean isEmpty(java.lang.String s)
s
- public boolean isRunningOnTablet()
public int calculateHeight(javax.microedition.lcdui.Image image, int newWidth)
image
- image used for the scalingnewWidth
- new width used for the calculation of the scalingpublic int calculateWidth(javax.microedition.lcdui.Image image, int newHeight)
image
- image used for the scalingnewHeight
- new height used for the calculation of the scaling