Migrate materialColor* attributes into colors

TLDR:
* This change should not break anything or change any color.
* Simplifies theming and styling while improving developer experience.
* With this  developers can often skip styling for color entirely, while ensuring consistency and preventing accidental overrides.

Bug: 374273611
Test: presubmit
Flag: EXEMPT bugfix
Change-Id: Id19038078e83c73847b1a7c686c3a3df1ecccac2
This commit is contained in:
Marcelo Arteiro committed 2024-11-21 13:08:11 +00:00
1 parent ad43c3dbc9
commit bc02103a6a
87 files changed
+245 -314

No files matched your search

@@ -30,7 +30,6 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.LauncherApps;
import android.content.pm.PackageManager;
import android.content.pm.ShortcutInfo;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Matrix;
@@ -217,14 +216,8 @@ public class BubbleCreator {
private Bitmap createOverflowBitmap() {
Drawable iconDrawable = mContext.getDrawable(R.drawable.bubble_ic_overflow_button);
final TypedArray ta = mContext.obtainStyledAttributes(
new int[]{
R.attr.materialColorOnPrimaryFixed,
R.attr.materialColorPrimaryFixed
});
int overflowIconColor = ta.getColor(0, Color.WHITE);
int overflowBackgroundColor = ta.getColor(1, Color.BLACK);
ta.recycle();
int overflowIconColor = mContext.getColor(R.color.materialColorOnPrimaryFixed);
int overflowBackgroundColor = mContext.getColor(R.color.materialColorPrimaryFixed);
iconDrawable.setTint(overflowIconColor);