Rumah > Soal Jawab > teks badan
迷茫2017-04-17 17:18:40
public static int sp2px(Context context, float spValue) {
final float scale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (spValue * scale + 0.5f);
}