public static enum Screen.ScreenType extends Enum<Screen.ScreenType>
resolve(float, float)| Enum Constant and Description |
|---|
LARGE
Type indicating Large screen.
|
NORMAL
Type indicating Normal screen.
|
SMALL
Type indicating Small screen.
|
UNKNOWN
Indicates that the screen type is unknown due to some error or the current screen data are
unavailable.
|
XLARGE
Type indicating X-Large screen.
|
| Modifier and Type | Field and Description |
|---|---|
float |
nativeHeightDp
Native dimension in DP units.
|
float |
nativeWidthDp
Native dimension in DP units.
|
| Modifier and Type | Method and Description |
|---|---|
static Screen.ScreenType |
resolve(float widthDp,
float heightDp)
Resolves an instance of ScreenType according to the given native screen dimensions from the
current set of ScreenType values.
|
static Screen.ScreenType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Screen.ScreenType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Screen.ScreenType UNKNOWN
public static final Screen.ScreenType SMALL
public static final Screen.ScreenType NORMAL
public static final Screen.ScreenType LARGE
public static final Screen.ScreenType XLARGE
public final float nativeWidthDp
public final float nativeHeightDp
public static Screen.ScreenType[] values()
for (Screen.ScreenType c : Screen.ScreenType.values()) System.out.println(c);
public static Screen.ScreenType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static Screen.ScreenType resolve(float widthDp, float heightDp)
widthDp - The value of native screen width, no current width.heightDp - The value of native screen height, no current height.UNKNOWN if there is no screen
type with the given dimensions specified.