摘自百度身份证识别Android SDK
import android.content.res.Resources;
public class DimensionUtil {
public static int dpToPx(int dp) {
return (int) (dp * Resources.getSystem().getDisplayMetrics().density);
}
}
摘自百度身份证识别Android SDK
import android.content.res.Resources;
public class DimensionUtil {
public static int dpToPx(int dp) {
return (int) (dp * Resources.getSystem().getDisplayMetrics().density);
}
}
本文标题:Code Snipe - dp2px
本文链接:https://www.haomeiwen.com/subject/dzdcrftx.html
网友评论