Adjacent Files

Project Info

. > app > src > main > java > james > alarmio > utils > ConversionUtils.java

getStatusBarHeight

Type: public static int

Returns the height of the device’s status bar, in px.

Parameter Name Description
context An active context instance.

Returned Value: The height of the status bar, in pixels.

dpToPx

Type: public static int

Converts dp units to pixels.

Parameter Name Description
dp A distance measurement, in dp.

Returned Value: The value of the provided dp units, in pixels.

pxToDp

Type: public static float

Converts pixels to dp.

Parameter Name Description
pixels A distance measurement, in pixels.

Returned Value: The value of the provided pixel units, in dp.

spToPx

Type: public static int

Converts sp to pixels.

Parameter Name Description
sp A distance measurement, in sp.

Returned Value: The value of the provided sp units, in pixels.

pxToSp

Type: public static float

Converts pixels to sp.

Parameter Name Description
pixels A distance measurement, in pixels.

Returned Value: The value of the provided pixel units, in sp.

This site may do shady things with cookies and stuff because it's evil. Please don't read my privacy policy. close