(Context context, int zoom)
| 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); |
no test coverage detected