怎么 Android 的 design metrics 是8之倍数?

发布日期:2018-06-06 来源:财富国际在线 阅读:
怎么 Android 的 design metrics 是8之倍数? 匿名用户 4小时前 118 All components align to an 8dp square baseline grid. Type aligns to a 4dp baseline grid. Iconography in toolbars align to a 4dp square baseline grid. This applies to mobile, tablet, and desktop. 官网没有解释这么做的理由,这样做的好处是什么?
0 0
其他回答
ldpi (120dpi) 0.75
mdpi (160dpi) 1.0 baseline
hdpi (240dpi) 1.5
xhdpi (320dpi) 2.0
xxhdpi (480dpi) 3.0


使用4的倍数表示你在以上任何一个设备上都不会得出奇数个像素甚至小数个像素。就保证了两个控件放在一起中间不会有1个像素的黑线




还有Google官方Design文档已更新为Material版,这是原版:


48dpRhythm

Touchable UI components are generally laid out along 48dp units.fpF财富国际



Why 48dp?

On average, 48dp translate to a physical size of about 9mm (with some variability). This is comfortably in the range of recommended target sizes (7-10 mm) for touchscreen objects and users will be able to reliably and accurately target them with their fingers.fpF财富国际

If you design your elements to be at least 48dp high and wide you can guarantee that:fpF财富国际

  • your targets will never be smaller than the minimum recommended target size of 7mm regardless of what screen they are displayed on.
  • you strike a good compromise between overall information density on the one hand, and targetability of UI elements on the other.


Mind the gaps

Spacing between each UI element is 8dp.fpF财富国际

热心网民 4小时前 0条评论
0 0
理由就是总要取个数。在适应不同分辨率的时候要除2,奇数肯定不行。偶数,你要取6,我要取10,OK,那就定个8吧。 李四正 4小时前 0条评论
0 0

关于我们 联系我们招聘信息免责申明广告服务 网站地图 百度地图 TAG标签

Copyright@2018-2022 Cfgjzx.Com 财富国际在线 版权所有 All Rights Reserved   
财富国际提供:最新财富资讯、房产资讯、股票资讯、区块链、投资理财、保险导购、健康产品、公私募基金,易经等资讯及服务.