Skip to content

Commit db94f66

Browse files
ikim24afohrman
authored andcommitted
Updating MDC library build files to add testing of each target.
PiperOrigin-RevId: 235203056
1 parent 3250a82 commit db94f66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/java/com/google/android/material/badge/BadgeDrawable.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ public int getBackgroundColor() {
6565
* @attr ref com.google.android.material.R.styleable#Badge_backgroundColor
6666
*/
6767
public void setBackgroundColor(@ColorInt int backgroundColor) {
68-
if (filledPaint.getColor() != backgroundColor) {
69-
setFillColor(ColorStateList.valueOf(backgroundColor));
68+
ColorStateList backgroundColorStateList = ColorStateList.valueOf(backgroundColor);
69+
if (getFillColor() != backgroundColorStateList) {
70+
setFillColor(backgroundColorStateList);
7071
invalidateSelf();
7172
}
7273
}

0 commit comments

Comments
 (0)