本文记录安卓开发过程中常用的参考数据。

1. API Level 与系统版本号对应关系

系统版本号 API Level 版本代号 发布时间
Android 6.0 23 M 2015.10
Android 5.1 22 Lollipop_mr1
Android 5.0 21 Lollipop
Android 4.4w 20 KITKAT_WATCH
Android 4.4 19 KITKAT
Android 4.3 18 JELLY_BEAN_MR2
Android 4.2, 4.3 17 JELLY_BEAN_MR1
Android 4.1, 4.1.1 16 JELLY_BEAN
Android 4.0.3, 4.0.4 15 ICE_CREAM_SANDWITCH_MR1
Android 4.0, 4.0.1, 4.0.2 15 ICE_CREAM_SANDWITCH
Android 3.2 13 HONEYCOMB_MR2
Android 3.1.X 12 HONEYCOMB_MR1
Android 3.0.X 11 HONEYCOMB
Android 2.3.3, 2.3.4 10 GINGERBREAD_MR1
Android 2.3, 2.3.1, 2.3.2 9 GINGERBREAD
Android 2.2.X 8 FROYO
Android 2.1.X 7 ECLAIR_MR1
Android 2.0.1 6 ECLAIR_0_1
Android 2.0 5 ECLAIR
Android 1.6 4 DONUT
Android 1.5 3 CUPCAKE
Android 1.1 2 BASE_1_1
Android 1.0 1 BASE 2008.09

戳我查看官方文档

2. dp和px换算关系对照表

为了适配多种分辨率,我们要按照 3:4:6:8 的比例来为上述资源文件夹设计图片文件,具体如下:

分辨率 DPI 示例设备 换算比例 像素 备注
ldpi 120 Galaxy Y 0.75x 1dp = 0.75px
mdpi 160 Galaxy Tab 1.0x 1dp = 1px
hdpi 240 Galaxy S II 1.5x 1dp = 1.5px
xhdpi 320 Nexus 4 2.0x 1dp = 2px 720p
xxhdpi 480 Nexus 5 3.0x 1dp = 3px 1080p
xxxhdpi 640 Nexus 6 4.0x 1dp = 4px

3. 图标尺寸一览表

Launcher icons
Three-dimensional, front view, with a slight perspective as if viewed from above, so that users perceive some depth.

尺寸(px) 格式 备注
48 × 48 (mdpi) .png
72 × 72 (hdpi) .png
96 × 96 (xhdpi) .png
144 × 144 (xxhdpi) .png
192 × 192 (xxxhdpi) .png
512 × 512 (Google Play store) .png



Action bar, Dialog & Tab icons
These icons are used in the action bar menu. The first number is the size of the icon area, and the second is file size.

尺寸(px) 格式 备注
24 × 24 area in 32 × 32 (mdpi) .png
36 × 36 area in 48 × 48 (hdpi) .png
48 × 48 area in 64 × 64 (xhdpi) .png
72 × 72 area in 96 × 96 (xxhdpi) .png
96 × 96 area in 128 × 128 (xxxhdpi) .png



Small Contextual Icons
Small icons are used to surface actions and/or provide status for specific items. For example, in the Gmail app, each message has a star icon that marks the message as important.

尺寸(px) 格式 备注
16 × 16 (mdpi) .png
24 × 24 (hdpi) .png
32 × 32 (xhdpi) .png
48 × 48 (xxhdpi) .png
64 × 64 (xxxhdpi) .png



Notification icons
These are used to represent application notifications in the status bar. They should be flat (no gradients), white and face-on perspective.

尺寸(px) 格式 备注
22 × 22 area in 24 × 24 (mdpi) .png
33 × 33 area in 36 × 36 (hdpi) .png
44 × 44 area in 48 × 48 (xhdpi) .png
66 × 66 area in 72 × 72 (xxhdpi) .png
88 × 88 area in 96 × 96 (xxxhdpi) .png

参考文献:

  • http://iconhandbook.co.uk/reference/chart/android/
  • https://www.google.com/design/spec/style/icons.html
  • https://www.creativefreedom.co.uk/icon-designers-blog/simple-android-icon-size-guide-for-lollipop-5-1/
  • https://www.google.com/design/spec/patterns/notifications.html#
  • https://www.google.com/design/spec/style/icons.html#icons-system-icons
  • http://petrnohejl.github.io/Android-Cheatsheet-For-Graphic-Designers/

更多相关文章

  1. Android——自定义ProgressBar显示文字(有缺陷)
  2. android程序执行adb shell命令
  3. Android(安卓)WIFI热点默认SSID的修改方法
  4. Android(安卓)Inset Drawable
  5. Android数据缓存
  6. Android(安卓)在Activity中获取控件尺寸的方法
  7. Android在onCreate()中获得控件尺寸
  8. Android尺寸单位
  9. 如何让android 支持多种屏幕尺寸

随机推荐

  1. android SQLite封装类
  2. Android之SurfaceView窗口/全屏播放
  3. android实现顶部底部固定 中间可滑动
  4. Android(安卓)通知栏ANR原因
  5. android 特效
  6. Android 动画 Animation
  7. 经典——Android 布局
  8. Android 开发中常用的adb命令
  9. Android NDK之发送短信
  10. Android NDK下载(r10~r21)