Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Assets

Benny
December 18, 2018

Android Assets

Is it a high resolution tablet?

Benny

December 18, 2018
Tweet

Other Decks in Programming

Transcript

  1. Ressourcen* ∼ Screen size (4) + screen pixel density (8)

    + layout orientation (2) + language and region (4000) + mobile country code (400) + multiple qualifier drawable-de-rAT-land (1) + variants [product flavour + build type] (∞) + ... * http://developer.android.com/guide/topics/resources/providing-resources.html
  2. Punktdichte (I) 1 Zoll = 2,54 cm 3 dpi* =

    3 ppi** * dots per inch 2 ** pixel per inch
  3. 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
  4. 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
  5. 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.
  6. 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
  7. Skalierbare Vektorgrafik <?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="100"

    height="100" viewBox="0 0 100 100"> <rect x="10" y="10" width="80" height="80" fill="#A4C739"/> </svg>