public class DisplayAttributes extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
densityDpi |
Indicates the display resolution.
|
float |
densityPixels |
Indicates the display density in pixels.
|
int |
height |
Indicates the actual height of the display, in unit of pixels.
|
static int |
HIGH_DENSITY |
Indicates a density for high-resolution display, with a value of 240.
|
static int |
LOW_DENSITY |
Indicates a density for low-resolution display, with a value of 120.
|
static int |
MEDIUM_DENSITY |
Indicates a density for medium-resolution display, with a value of 160.
|
float |
scalDensity |
Indicates the text scale density of a display.
|
int |
width |
Indicates the actual width of the display, in unit of pixels.
|
float |
xDpi |
Indicates the dots per inch (DPI) on X-axis.
|
float |
yDpi |
Indicates the DPI on Y-axis.
|
| 构造器 | 说明 |
|---|---|
DisplayAttributes() |
Default constructor used to create a
DisplayAttributes instance. |
public static final int HIGH_DENSITY
public static final int LOW_DENSITY
public static final int MEDIUM_DENSITY
public int densityDpi
public float densityPixels
public int height
public float scalDensity
public int width
public float xDpi
public float yDpi