px与dip之间的转换

官网 http://developer.android.com/reference/android/util/TypedValue.html

public static float applyDimension (int unit, float value, DisplayMetrics metrics)

Added in API level 1

Converts an unpacked complex data value holding a dimension to its final floating point value. The two parameters unit and value are as in TYPE_DIMENSION.

Parameters
unit The unit to convert from.
value The value to apply the unit to.
metrics Current display metrics to use in the conversion -- supplies display density and scaling information.
Returns
  • The complex floating point value multiplied by the appropriate metrics depending on its unit.

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/oMartin1/article/details/46787403
上一篇反编译
下一篇配置NDK syntax error:&…
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭