android TypedValue.applyDimension()的做用

这个方法是转变为标准尺寸的一个函数,例如app

int size = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, context.getResources().getDisplayMetrics());函数

这里COMPLEX_UNIT_DIP是单位,20是数值,也就是20dp。get

相关文章
相关标签/搜索