public static enum Screen.ScreenDensity extends Enum<Screen.ScreenDensity>
resolve(float)| Enum Constant and Description |
|---|
HDPI
Height density per inch.
|
LDPI
Low density per inch:
density: 120
scale ratio: .75
|
MDPI
Medium density per inch.
|
UNKNOWN
Indicates that the screen density is unknown due to some error or the current screen data
are unavailable.
|
XHDPI
Extra-Height density per inch.
|
XXHDPI
Extra-Extra-Eeight density per inch.
|
XXXHDPI
Extra-Extra-Extra-Height density per inch.
|
| Modifier and Type | Field and Description |
|---|---|
float |
scaleRatio
The value of scale ratio specific for this screen density.
|
float |
value
The value of this screen density in DPI units.
|
| Modifier and Type | Method and Description |
|---|---|
static Screen.ScreenDensity |
resolve(float densityDpi)
Resolves an instance of ScreenDensity according to the given densityDpi.
|
static Screen.ScreenDensity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Screen.ScreenDensity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Screen.ScreenDensity UNKNOWN
public static final Screen.ScreenDensity LDPI
public static final Screen.ScreenDensity MDPI
public static final Screen.ScreenDensity HDPI
public static final Screen.ScreenDensity XHDPI
public static final Screen.ScreenDensity XXHDPI
public static final Screen.ScreenDensity XXXHDPI
public final float value
public final float scaleRatio
public static Screen.ScreenDensity[] values()
for (Screen.ScreenDensity c : Screen.ScreenDensity.values()) System.out.println(c);
public static Screen.ScreenDensity 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.ScreenDensity resolve(float densityDpi)