|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.util.DisplayMetrics
public class DisplayMetrics
A structure describing general information about a display, such as its size, density, and font scaling.
| Field Summary | |
|---|---|
float |
density
The logical density of the display. |
int |
heightPixels
The absolute height of the display in pixels. |
float |
scaledDensity
A scaling factor for fonts displayed on the display. |
int |
widthPixels
The absolute width of the display in pixels. |
float |
xdpi
The exact physical pixels per inch of the screen in the X dimension. |
float |
ydpi
The exact physical pixels per inch of the screen in the Y dimension. |
| Constructor Summary | |
|---|---|
DisplayMetrics()
|
|
| Method Summary | |
|---|---|
void |
setTo(DisplayMetrics o)
|
void |
setToDefaults()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int widthPixels
public int heightPixels
public float density
This value does not exactly follow the real screen size (as given by
xdpi and ydpi, but rather is used to scale the size of
the overall UI in steps based on gross changes in the display dpi. For
example, a 240x320 screen will have a density of 1 even if its width is
1.8", 1.3", etc. However, if the screen resolution is increased to
320x480 but the screen size remained 1.5"x2" then the density would be
increased (probably to 1.5).
public float scaledDensity
density, except that it may be adjusted in smaller
increments at runtime based on a user preference for the font size.
public float xdpi
public float ydpi
| Constructor Detail |
|---|
public DisplayMetrics()
| Method Detail |
|---|
public void setTo(DisplayMetrics o)
public void setToDefaults()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||