Updating widget tray theme

Using standard theme attributes rather than custom color codes, so
that it plays nice with system theme changes.

Bug: 34819119
Bug: 34897402
Bug: 21446746
Change-Id: I265fba3ceae8873650fd09e4704838d313155e83
This commit is contained in:
Sunny Goyal
2017-02-07 13:11:17 -08:00
parent db7b82960a
commit d5d5e22715
17 changed files with 68 additions and 93 deletions

View File

@@ -608,7 +608,11 @@ public final class Utilities {
}
public static int getColorAccent(Context context) {
TypedArray ta = context.obtainStyledAttributes(new int[]{android.R.attr.colorAccent});
return getAttrColor(context, android.R.attr.colorAccent);
}
public static int getAttrColor(Context context, int attr) {
TypedArray ta = context.obtainStyledAttributes(new int[]{attr});
int colorAccent = ta.getColor(0, 0);
ta.recycle();
return colorAccent;