(float dip)
| 46 | } |
| 47 | |
| 48 | public static float dip2px(float dip) { |
| 49 | Resources r = HostInfo.getApplication().getResources(); |
| 50 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, r.getDisplayMetrics()); |
| 51 | } |
| 52 | |
| 53 | public static int dp(float dp) { |
| 54 | return (int) dip2px(dp); |
no test coverage detected