Scale factor for xxhdpi android?

according to http://developer.android.com/training/multiscreen/screendensities.html

The following scale factors are indicated.

xhdpi: 2.0 hdpi: 1.5 mdpi: 1.0 (base level) ldpi: 0.75

I was wondering what would be the scale factor for xxhdpi?

+70
android android-screen-support
Sep 06 '13 at 10:07 on
source share
2 answers

In android.util.DisplayMetrics you can see that the scaling factor is 0.00625 :

/** * Scaling factor to convert a density in DPI units to the density scale. * @hide */ public static final float DENSITY_DEFAULT_SCALE = 1.0f / DENSITY_DEFAULT; 

Where DENSITY_DEFAULT - 160 β†’ scaling factor = 1.0f / 160 = 0.00625.

 sizeScale = DENSITY_DEFAULT_SCALE * DENSITY_DPI 

From this:

  • ldpi = 0.00625 * 120 β†’ 0.75
  • mdpi = 0.00625 * 160 β†’ 1.0
  • hdpi = 0.00625 * 240 β†’ 1.5
  • xhdpi = 0.00625 * 320 β†’ 2.0
  • xxhdpi = 0.00625 * 480 β†’ 3.0
  • xxxhdpi = 0.00625 * 640 β†’ 4.0

Not exactly rocket science, but I hope that it will be useful for someone :)

+248
Sep 06 '13 at 11:04 on
source share

If you look at the Indicators and grids , you will see that xxhdpi is 480 dpi, which is 3 times more than the baseline (mdpi @ 1.0). In other words, the scale factor for xxhdpi is 3.0

+6
Sep 06 '13 at 10:43 on
source share



All Articles