Punktdichte (II) Android Donut Gingerbread Honeycomb* Jelly Bean Jelly Bean* Generalized density low medium** high extra high tv extra extra high extra extra extra high Minimum dots per inch 120 160 240 320 213 480 640 Scaling ratio 3 4 6 8 5,2 12 16 Factor of default 0,7 5 1 1,5 2 1,33 3 4 Resource qualifier ldpi mdpi hdpi xhdpi tvdpi xxhdpi xxxhdpi * maintenance release 2 ** default
Punktdichte (II) Android Donut Gingerbread Honeycomb* Jelly Bean Jelly Bean* Generalized density low medium** high extra high tv extra extra high extra extra extra high Minimum dots per inch 120 160 240 320 213 480 640 Scaling ratio 3 4 6 8 5,2 12 16 Factor of default 0,7 5 1 1,5 2 1,33 3 4 Resource qualifier ldpi mdpi hdpi xhdpi tvdpi xxhdpi xxxhdpi * maintenance release 2 ** default
Beispiel - Umrechnung Gegeben Eine drawalbe-ldpi/icon.png Grafik mit der Breite 6 Pixel. factor of default low fl = 0,75 factor of default xhigh fx = 2 width low wl = 6 Gesucht Die Breite in Pixel der drawable-xhdpi/icon.png Grafik. width xhigh wx Lösung w = w wx / fx = wl / fl wx = (wl * fx) / fl wx = (6*2)/0,75 = 16 Die Breite der xhigh Grafik ist 16 Pixel.
Größen Generalized Size small normal large xlarge Minimum width and height in dp* units 320 x 426 320 x 470 480 x 640 720 x 960 * density independent pixels 1 dp = 1 dip = 1px in generalized density default
* http://www.motorola.com/us/shop-all-mobile-phones-1/Moto-G/moto-g-pdp.html#moto-g-pdp-specifications Device Display Generalized Densitiy Moto G* 720 x 1280 360 x 640 329 normal xhigh Beispiel - Smartphone