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

Method getTextSize

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

Source from the content-addressed store, hash-verified

2180 }
2181
2182 static float getTextSize(Context context, int zoom) {
2183 TypedArray ta = null;
2184 try {
2185 if (zoom == 0)
2186 ta = context.obtainStyledAttributes(
2187 androidx.appcompat.R.style.TextAppearance_AppCompat_Small, new int[]{android.R.attr.textSize});
2188 else if (zoom == 2)
2189 ta = context.obtainStyledAttributes(
2190 androidx.appcompat.R.style.TextAppearance_AppCompat_Large, new int[]{android.R.attr.textSize});
2191 else
2192 ta = context.obtainStyledAttributes(
2193 androidx.appcompat.R.style.TextAppearance_AppCompat_Medium, new int[]{android.R.attr.textSize});
2194 return ta.getDimension(0, 0);
2195 } finally {
2196 if (ta != null)
2197 ta.recycle();
2198 }
2199 }
2200
2201 static int resolveColor(Context context, int attr) {
2202 return resolveColor(context, attr, 0xFF0000);

Callers 15

onCreateDialogMethod · 0.95
runMethod · 0.95
onCreateViewMethod · 0.95
onCreateDialogMethod · 0.95
fromDocumentMethod · 0.95
setListMethod · 0.95
setZoomMethod · 0.95
getViewMethod · 0.95
updatePreviewMethod · 0.95
AdapterMessageMethod · 0.95
setZoomMethod · 0.95
AdapterFolderMethod · 0.95

Calls 1

getDimensionMethod · 0.80

Tested by

no test coverage detected