Theme block quote color

This commit is contained in:
M66B
2021-07-05 06:53:21 +02:00
parent 79c0c8fffe
commit 6e07657557
6 changed files with 19 additions and 9 deletions

View File

@@ -1035,9 +1035,13 @@ public class Helper {
}
static int resolveColor(Context context, int attr) {
return resolveColor(context, attr, 0xFF0000);
}
static int resolveColor(Context context, int attr, int def) {
int[] attrs = new int[]{attr};
TypedArray a = context.getTheme().obtainStyledAttributes(attrs);
int color = a.getColor(0, 0xFF0000);
int color = a.getColor(0, def);
a.recycle();
return color;
}