public enum Density extends java.lang.Enum<Density> implements ResourceEnum
| Enum Constant and Description |
|---|
HIGH |
LOW |
MEDIUM |
NODPI |
TV |
XHIGH |
XXHIGH |
XXXHIGH |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_DENSITY |
| Modifier and Type | Method and Description |
|---|---|
static Density |
getByIndex(int index) |
int |
getDpiValue() |
static Density |
getEnum(int value)
Returns the enum matching the given density value
|
static Density |
getEnum(java.lang.String value)
Returns the enum matching the provided qualifier value.
|
static int |
getIndex(Density value) |
java.lang.String |
getLegacyValue() |
java.lang.String |
getLongDisplayValue()
Returns a long string for display value.
|
java.lang.String |
getResourceValue()
Returns the resource string.
|
java.lang.String |
getShortDisplayValue()
Returns a short string for display value.
|
boolean |
isFakeValue()
Whether the value is neither used for device nor resources.
|
boolean |
isValidValueForDevice()
Whether the value actually used on device.
|
int |
since() |
static Density |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Density[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Density XXXHIGH
public static final Density XXHIGH
public static final Density XHIGH
public static final Density HIGH
public static final Density TV
public static final Density MEDIUM
public static final Density LOW
public static final Density NODPI
public static final int DEFAULT_DENSITY
public static Density[] values()
for (Density c : Density.values()) System.out.println(c);
public static Density valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namejava.lang.NullPointerException - if the argument is nullpublic static Density getEnum(java.lang.String value)
value - The qualifier value.public static Density getEnum(int value)
value - The density value.public java.lang.String getResourceValue()
ResourceEnumgetResourceValue in interface ResourceEnumpublic int getDpiValue()
public int since()
public java.lang.String getLegacyValue()
public java.lang.String getShortDisplayValue()
ResourceEnumgetShortDisplayValue in interface ResourceEnumResourceEnum.getLongDisplayValue()public java.lang.String getLongDisplayValue()
ResourceEnumgetLongDisplayValue in interface ResourceEnumResourceEnum.getShortDisplayValue()public static int getIndex(Density value)
public static Density getByIndex(int index)
public boolean isFakeValue()
ResourceEnumisFakeValue in interface ResourceEnumpublic boolean isValidValueForDevice()
ResourceEnumisValidValueForDevice in interface ResourceEnum