公告板
版本库
filestore
活动
搜索
登录
韦秀桡
/
HDL_APP_Project
HDL-On
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
20200612
wxr
2020-06-15
b8e94316e41eba72d927d5ca7d931b26139ee8ff
[~wxr/HDL_APP_Project.git]
/
MyJar
/
src
/
MyJar
/
DensityUtil.java
1
2
3
4
5
6
7
8
9
10
11
package MyJar;
import android.content.Context;
public class DensityUtil {
public static float dip2px(Context context, float dpValue) {
float scale = context.getResources().getDisplayMetrics().density;
return dpValue * scale;
}
}