MCPcopy Create free account
hub / github.com/M66B/FairEmail / dp2pixels

Method dp2pixels

app/src/main/java/eu/faircode/email/Helper.java:2172–2175  ·  view source on GitHub ↗
(Context context, int dp)

Source from the content-addressed store, hash-verified

2170 // Graphics
2171
2172 static int dp2pixels(Context context, int dp) {
2173 float scale = context.getResources().getDisplayMetrics().density;
2174 return Math.round(dp * scale);
2175 }
2176
2177 static int pixels2dp(Context context, float pixels) {
2178 float scale = context.getResources().getDisplayMetrics().density;

Callers 15

setContentViewMethod · 0.95
onClickMethod · 0.95
getShortcutMethod · 0.95
AdapterNavUnifiedMethod · 0.95
onExecuteMethod · 0.95
onAttachedToWindowMethod · 0.95
decodeImageMethod · 0.95
fitDrawableMethod · 0.95
onExecuteMethod · 0.95
onCreateDialogMethod · 0.95
onChangedMethod · 0.95
runMethod · 0.95

Calls 1

getResourcesMethod · 0.45

Tested by

no test coverage detected