http://developer.android.com/guide/practices/screens_support.html

dp 换算为 px

1
2
3
DisplayMetrics metrics = getResources().getDisplayMetrics();
final float scale = metrics.density;
int px = (int) (someDpValue * scale + 0.5f);

DisplayMetrics.density 参考值

1
2
3
4
5
6
0.75 on ldpi (120 dpi)
1.0 on mdpi (160 dpi; baseline)
1.5 on hdpi (240 dpi)
2.0 on xhdpi (320 dpi)
3.0 on xxhdpi (480 dpi)
4.0 on xxxhdpi (640 dpi)

Alternative drawables

To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six generalized densities. For example, if you have a bitmap drawable that’s 48x48 pixels for medium-density screens, all the different sizes should be:

1
2
3
4
5
6
36x36 (0.75x) for low-density
48x48 (1.0x baseline) for medium-density
72x72 (1.5x) for high-density
96x96 (2.0x) for extra-high-density
144x144 (3.0x) for extra-extra-high-density
192x192 (4.0x) for extra-extra-extra-high-density (launcher icon only; see note above)

Icon Design Guidelines: https://www.google.com/design/spec/style/icons.html#