/**@class android.util.DisplayMetrics @extends java.lang.Object A structure describing general information about a display, such as its size, density, and font scaling. <p>To access the DisplayMetrics members, initialize an object like this:</p> <pre> DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics);</pre> */ var DisplayMetrics = { /** Standard quantized DPI for low-density screens. */ DENSITY_LOW : "120", /** Intermediate density for screens that sit between {@link #DENSITY_LOW} (120dpi) and {@link #DENSITY_MEDIUM} (160dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_MEDIUM} assets for them. */ DENSITY_140 : "140", /** Standard quantized DPI for medium-density screens. */ DENSITY_MEDIUM : "160", /** Intermediate density for screens that sit between {@link #DENSITY_MEDIUM} (160dpi) and {@link #DENSITY_HIGH} (240dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_HIGH} assets for them. */ DENSITY_180 : "180", /** Intermediate density for screens that sit between {@link #DENSITY_MEDIUM} (160dpi) and {@link #DENSITY_HIGH} (240dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_HIGH} assets for them. */ DENSITY_200 : "200", /** This is a secondary density, added for some common screen configurations. It is recommended that applications not generally target this as a first class density -- that is, don't supply specific graphics for this density, instead allow the platform to scale from other densities (typically {@link #DENSITY_HIGH}) as appropriate. In most cases (such as using bitmaps in {@link android.graphics.drawable.Drawable}) the platform can perform this scaling at load time, so the only cost is some slight startup runtime overhead. <p>This density was original introduced to correspond with a 720p TV screen: the density for 1080p televisions is {@link #DENSITY_XHIGH}, and the value here provides the same UI size for a TV running at 720p. It has also found use in 7" tablets, when these devices have 1280x720 displays. */ DENSITY_TV : "213", /** Intermediate density for screens that sit between {@link #DENSITY_MEDIUM} (160dpi) and {@link #DENSITY_HIGH} (240dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_HIGH} assets for them. */ DENSITY_220 : "220", /** Standard quantized DPI for high-density screens. */ DENSITY_HIGH : "240", /** Intermediate density for screens that sit between {@link #DENSITY_HIGH} (240dpi) and {@link #DENSITY_XHIGH} (320dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XHIGH} assets for them. */ DENSITY_260 : "260", /** Intermediate density for screens that sit between {@link #DENSITY_HIGH} (240dpi) and {@link #DENSITY_XHIGH} (320dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XHIGH} assets for them. */ DENSITY_280 : "280", /** Intermediate density for screens that sit between {@link #DENSITY_HIGH} (240dpi) and {@link #DENSITY_XHIGH} (320dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XHIGH} assets for them. */ DENSITY_300 : "300", /** Standard quantized DPI for extra-high-density screens. */ DENSITY_XHIGH : "320", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXHIGH} assets for them. */ DENSITY_340 : "340", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXHIGH} assets for them. */ DENSITY_360 : "360", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXHIGH} assets for them. */ DENSITY_400 : "400", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXHIGH} assets for them. */ DENSITY_420 : "420", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXHIGH} assets for them. */ DENSITY_440 : "440", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXHIGH} assets for them. */ DENSITY_450 : "450", /** Standard quantized DPI for extra-extra-high-density screens. */ DENSITY_XXHIGH : "480", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XXHIGH} (480 dpi) and {@link #DENSITY_XXXHIGH} (640 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXXHIGH} assets for them. */ DENSITY_560 : "560", /** Intermediate density for screens that sit somewhere between {@link #DENSITY_XXHIGH} (480 dpi) and {@link #DENSITY_XXXHIGH} (640 dpi). This is not a density that applications should target, instead relying on the system to scale their {@link #DENSITY_XXXHIGH} assets for them. */ DENSITY_600 : "600", /** Standard quantized DPI for extra-extra-extra-high-density screens. Applications should not generally worry about this density; relying on XHIGH graphics being scaled up to it should be sufficient for almost all cases. A typical use of this density would be 4K television screens -- 3840x2160, which is 2x a traditional HD 1920x1080 screen which runs at DENSITY_XHIGH. */ DENSITY_XXXHIGH : "640", /** The reference density used throughout the system. */ DENSITY_DEFAULT : "160", /** Scaling factor to convert a density in DPI units to the density scale. @hide */ DENSITY_DEFAULT_SCALE : "0.00625", /** The device's current density. <p> This value reflects any changes made to the device density. To obtain the device's stable density, use {@link #DENSITY_DEVICE_STABLE}. @hide This value should not be used. @deprecated Use {@link #DENSITY_DEVICE_STABLE} to obtain the stable device density or {@link #densityDpi} to obtain the current density for a specific display. */ DENSITY_DEVICE : "null", /** The device's stable density. <p> This value is constant at run time and may not reflect the current display density. To obtain the current density for a specific display, use {@link #densityDpi}. */ DENSITY_DEVICE_STABLE : "null", /** The absolute width of the available display size in pixels. */ widthPixels : "null", /** The absolute height of the available display size in pixels. */ heightPixels : "null", /** The logical density of the display. This is a scaling factor for the Density Independent Pixel unit, where one DIP is one pixel on an approximately 160 dpi screen (for example a 240x320, 1.5"x2" screen), providing the baseline of the system's display. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc. <p>This value does not exactly follow the real screen size (as given by {@link #xdpi} and {@link #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). @see #DENSITY_DEFAULT */ density : "null", /** The screen density expressed as dots-per-inch. May be either {@link #DENSITY_LOW}, {@link #DENSITY_MEDIUM}, or {@link #DENSITY_HIGH}. */ densityDpi : "null", /** A scaling factor for fonts displayed on the display. This is the same as {@link #density}, except that it may be adjusted in smaller increments at runtime based on a user preference for the font size. */ scaledDensity : "null", /** The exact physical pixels per inch of the screen in the X dimension. */ xdpi : "null", /** The exact physical pixels per inch of the screen in the Y dimension. */ ydpi : "null", /** The reported display width prior to any compatibility mode scaling being applied. @hide */ noncompatWidthPixels : "null", /** The reported display height prior to any compatibility mode scaling being applied. @hide */ noncompatHeightPixels : "null", /** The reported display density prior to any compatibility mode scaling being applied. @hide */ noncompatDensity : "null", /** The reported display density prior to any compatibility mode scaling being applied. @hide */ noncompatDensityDpi : "null", /** The reported scaled density prior to any compatibility mode scaling being applied. @hide */ noncompatScaledDensity : "null", /** The reported display xdpi prior to any compatibility mode scaling being applied. @hide */ noncompatXdpi : "null", /** The reported display ydpi prior to any compatibility mode scaling being applied. @hide */ noncompatYdpi : "null", /** */ setTo : function( ) {}, /** */ setToDefaults : function( ) {}, /** */ equals : function( ) {}, /**Returns true if these display metrics equal the other display metrics. @param {Object {DisplayMetrics}} other The display metrics with which to compare. @return {Boolean} True if the display metrics are equal. */ equals : function( ) {}, /**Returns true if the physical aspects of the two display metrics are equal. This ignores the scaled density, which is a logical attribute based on the current desired font size. @param {Object {DisplayMetrics}} other The display metrics with which to compare. @return {Boolean} True if the display metrics are equal. @hide */ equalsPhysical : function( ) {}, /** */ hashCode : function( ) {}, /** */ toString : function( ) {}, };