public final class SizeUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
dipToPx(android.content.Context ctx,
float dpSize)
Convert Density-Independent Pixels to actual pixels
|
static float |
dpToPx(android.content.Context ctx,
float dpSize)
Convert Density-Independent Pixels to actual pixels
|
static float |
spToPx(android.content.Context ctx,
float spSize)
Convert Scale-Dependent Pixels to actual pixels
|
public static float dpToPx(android.content.Context ctx,
float dpSize)
ctx - the application contextdpSize - the size in DP unitspublic static int dipToPx(android.content.Context ctx,
float dpSize)
ctx - the application context to convert the value withdpSize - the size in DP unitspublic static float spToPx(android.content.Context ctx,
float spSize)
ctx - the application contextspSize - the size in SP units