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

今更「dp」を考える / Let's think about "dp" now

今更「dp」を考える / Let's think about "dp" now

2020年も12月になってAndroidのデザイン要素である「dp」について考えたお話です。社内用のものから修正が加わっています。

Yoshihiro WADA

December 14, 2020
Tweet

More Decks by Yoshihiro WADA

Other Decks in Programming

Transcript

  1. w J04ΞϓϦʢJ1BE04͸ͪΐͬͱແࢹʣͷը໘σβΠϯΛߟ͑Δ w ը໘ͷԣ෯͸ʁ w ֤σόΠεʹ༩͑ΒΕΔʮ$44ϐΫηϧʯ͕ج४ʹͳΔ w ී௨ͷ୺຤QYJ1IPOF1SPɺJ1IPOF4&ʢOEHFOʣͱ͔ w େ͖͍୺຤QYJ1IPOF1SP.BYɺJ1IPOFͱ͔

    w খ͍͞୺຤QYJ1IPOF4&ʢTUHFOʣ w ը໘ͷॎ෯͸ʁ w ͪ͜Β΋$44ϐΫηϧ͕ج४ɻ୺຤ʹΑͬͯͩͬͨΓͩͬͨΓ Ұ୴ࢀߟఔ౓ʹJ04J1IPOFͷ࿩Λ͠Α͏ 4
  2. w J04ΞϓϦʢJ1BE04͸ͪΐͬͱແࢹʣͷը໘σβΠϯΛߟ͑Δ w ը໘ͷԣ෯͸ʁ w ֤σόΠεʹ༩͑ΒΕΔʮ$44ϐΫηϧʯ͕ج४ʹͳΔ w ී௨ͷ୺຤QYJ1IPOF1SPɺJ1IPOF4&ʢOEHFOʣͱ͔ w େ͖͍୺຤QYJ1IPOF1SP.BYɺJ1IPOFͱ͔

    w খ͍͞୺຤QYJ1IPOF4&ʢTUHFOʣ w ը໘ͷॎ෯͸ʁ w ͪ͜Β΋$44ϐΫηϧ͕ج४ɻ୺຤ʹΑͬͯͩͬͨΓͩͬͨΓ Ұ୴ࢀߟఔ౓ʹJ04J1IPOFͷ࿩Λ͠Α͏ 5 ʢ৔߹ʹΑͬͯ͸ʣ ԣ෯ʹ߹Θͤͨ௨Γͷ σβΠϯΛ͍ͯ͠Δɻ Χϧʔηϧͱ͔ɻ
  3. w EQɿEFOTJUZJOEFQFOEFOUQJYFMT w ີ౓ඇґଘϐΫηϧɻEJQͬͯݺ͹ΕΔ͜ͱ΋ɻ w Ͳͷը໘ີ౓Ͱ΋ಉ͡Α͏ʹදࣔͰ͖ΔϐΫηϧ୯Ґͱ͍͏͜ͱɻ w EQ஋ΛEQJʹԠͯ͡ܭࢉ͢Δ͜ͱͰɺ࣮ࡍʹදࣔ͞ΕΔQYʹม׵͢Δ͜ ͱ͕Ͱ͖Δɻ w

    QYEQY EQJ  w ݫີʹ͸ઌड़ͷ൚༻ີ౓ͷഒ཰ʹ͸ͳΒͳ͍ͷͰɺʮYYYIEQJͷ୺຤ͩ ͔ΒEQ͸ඞͣQYʂʯͱ͍͏࿩Ͱ͸ͳ͍ EQʹ·ͭΘΔ୯Ґʢʣ 21
  4. w ղ૾౓YQYɺը໘αΠζΠϯν w EQJ͸ͳͷͰYYIEQJEQഒ཰͸ഒ w ͭ·Γը໘αΠζ͸ w  Y 

    YEQ w Ұੲͷ"OESPJEσόΠε͸ඪ४తͳYEQʹ ଗ͍ͬͯΔ͜ͱ͕ଟ͍ 91&3*"9;ͷ৔߹ 28 91&3*"9; ʢΠϯνʣ YQY
  5. w ղ૾౓YQYɺը໘αΠζ໿Πϯν w EQJ͸ͳͷͰYIEQJEQഒ཰͸ഒ w ͭ·Γը໘αΠζ͸ w  Y 

    YEQ w 3BLVUFO.JOJ͸ը໘αΠζ͕খ͍͞ͱ͸͍͑ɺ "OESPJEͷը໘σβΠϯʹԙ͍ͯ͸ඪ४తͳେ͖͞Ͱ͋Δ 3BLVUFO.JOJͷ৔߹ 29 3BLVUFO.JOJ ʢ໿Πϯνʣ YQY
  6. w ղ૾౓YQYɺը໘αΠζΠϯν w EQJ͸ͳͷͰYYYIEQJ w EQഒ཰͸ͳ͔ͥഒ w ͭ·Γը໘αΠζ͸ w 

    Y  ˺YEQ 1JYFMͷ৔߹ 33 1JYFM9- ʢΠϯνʣ YQY
  7. w $ adb shell dumpsys display w ୺຤ͷը໘৘ใʢղ૾౓ɺը໘ີ౓ଞʣΛऔಘ͢Δ w $

    adb shell wm size 1080x1920 w ୺຤ͷը໘ղ૾౓Λڧ੍తʹઃఆ͢Δɻ͜͜Ͱ͸YQYʹͳΔ w $ adb shell wm density 360 w ୺຤ͷը໘ີ౓Λڧ੍తʹઃఆ͢Δɻ͜͜Ͱ͸EQJʹͳΔ w $ adb shell wm {size|density} reset w ୺຤ͷը໘ઃఆΛॳظԽ͢Δɻ΋ͱʹ໭͍ͨ͠ͱ͖͸͜Εɻ BECίϚϯυΛ࢖͏ 40
  8. w IUUQTRJJUBDPNOFJOJUFNTBBDDC w ʲ"OESPJEʳ͍·͞Βฉ͚ͳ͍EQೖ໳c2JJUB w IUUQTEFWFMPQFSBOESPJEDPNUSBJOJOHNVMUJTDSFFOTDSFFOEFOTJUJFT IMKB w ֤छͷϐΫηϧີ౓Λαϙʔτ͢Δc"OESPJE%FWFMPQFST w

    IUUQTEFWFMPQFSBOESPJEDPNBCPVUWFSTJPOTOPVHBUBOESPJEDIBOHFTIUNM IMKBTDSFFO[PPN w "OESPJEͷಈ࡞ͷมߋ఺ը໘ͷζʔϜc"OESPJE%FWFMPQFST w IUUQTEFWFMPQFSBOESPJEDPNHVJEFUPQJDTSFTPVSDFTQSPWJEJOHSFTPVSDFTIUNM IMKB"MUFSOBUJWF3FTPVSDFT w ΞϓϦϦιʔεͷ֓ཁ୅ସϦιʔεΛఏڙ͢Δc"OESPJE%FWFMPQFST 3FGFSFODFT 43