关于android的单位dp与px

 

原文:Android中dp和px之间进行转换

 

官方文档:http://developer.android.com/guide/practices/screens_support.html

The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen.

The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160).

 

posted @ 2016-07-15 21:32  liDB  阅读(245)  评论(0编辑  收藏  举报