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

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 获取屏幕尺寸实例代码
  2. android ORM 关系映射 ormLite
  3. Android的碎片fragment和activity之前的关系 以及MVP模式详解
  4. android中ADT和SDK的关系
  5. Android API level 与version对应关系(最新整理2017.06.26 16:21)
  6. Android点击事件onTouchEvent与onInterceptTouchEvent传递关系-
  7. Android 在Activity中获取控件尺寸的方法
  8. Android在onCreate()中获得控件尺寸
  9. android各层调用关系,架构流程

随机推荐

  1. android实现观察者模式的几种方法
  2. Android的内存机制和常见泄漏情形
  3. Android(安卓)APN的设置问题--进一步讨论
  4. android工程下运行main方法的配置方法
  5. 史上最全的Android开发学习教程集锦【初
  6. Android工程 引用另外一个Android工程
  7. J2me游戏如何快速移植到Android(安卓)(2)
  8. Android引入广播机制的用意。单线程模型M
  9. Android(安卓)App 启动流程梳理(基于 Andr
  10. Android工程的编译过程