dip转px
1
2
3
4
5
6
|
private int getPixels( int dipValue){ Resources r = getResources(); int px = ( int )TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dipValue, r.getDisplayMetrics()); return px; } |