public final class ScreenSizeHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ScreenSizeHelper.ScreenSize
Enumerates the possible screen sizes, as specified in
Configuration. |
| Modifier and Type | Method and Description |
|---|---|
static int |
getScreenHeight(android.view.WindowManager windowManager)
Returns the absolute height of this device's screen, measured in pixels.
|
static ScreenSizeHelper.ScreenSize |
getScreenSize(android.content.res.Resources res) |
static int |
getScreenWidth(android.view.WindowManager windowManager)
Returns the absolute width of this device's screen, measured in pixels.
|
static boolean |
screenIsLarge(android.content.res.Resources res)
Determines if the device configuration specifies the screen size as large, as specified in
Configuration. |
static boolean |
screenIsNormal(android.content.res.Resources res)
Determines if the device configuration specifies the screen size as normal, as specified in
Configuration. |
static boolean |
screenIsSmall(android.content.res.Resources res)
Determines if the device configuration specifies the screen size as small, as specified in
Configuration. |
static boolean |
screenIsUndefined(android.content.res.Resources res)
Determines if the device configuration specifies the screen size as undefined, as specified
in
Configuration. |
static boolean |
screenIsXLarge(android.content.res.Resources res)
Determines if the device configuration specifies the screen size as extra-large, as
specified in
Configuration. |
public static ScreenSizeHelper.ScreenSize getScreenSize(android.content.res.Resources res)
res - a Resource object which allows the device configuration to be queriedpublic static boolean screenIsUndefined(android.content.res.Resources res)
Configuration.res - a Resource object which allows the device configuration to be queriedpublic static boolean screenIsXLarge(android.content.res.Resources res)
Configuration.res - a Resource object which allows the device configuration to be queriedpublic static boolean screenIsLarge(android.content.res.Resources res)
Configuration.res - a Resource object which allows the device configuration to be queriedpublic static boolean screenIsNormal(android.content.res.Resources res)
Configuration.res - a Resource object which allows the device configuration to be queriedpublic static boolean screenIsSmall(android.content.res.Resources res)
Configuration.res - a Resource object which allows the device configuration to be queriedpublic static int getScreenWidth(android.view.WindowManager windowManager)
windowManager - the window manager for the calling applicationpublic static int getScreenHeight(android.view.WindowManager windowManager)
windowManager - the window manager for the calling application