Supporting Multiple Screens
http://developer.android.com/guide/practices/screens_support.html
dp 换算为 px
1 | DisplayMetrics metrics = getResources().getDisplayMetrics(); |
DisplayMetrics.density 参考值
1 | 0.75 on ldpi (120 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 | 36x36 (0.75x) for low-density |
Icon Design Guidelines: https://www.google.com/design/spec/style/icons.html#