Skip to content

Commit a25e13c

Browse files
afohrmangsajith
authored andcommitted
Update isStateful() method in MaterialShapeDrawable.
isStateful() should include the statefulness of the fill and stroke colors. PiperOrigin-RevId: 219310584
1 parent 85bec58 commit a25e13c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/java/com/google/android/material/shape/MaterialShapeDrawable.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,8 +1067,11 @@ private PorterDuffColorFilter calculateTintFilter(
10671067

10681068
@Override
10691069
public boolean isStateful() {
1070-
return (tintList != null && tintList.isStateful())
1071-
|| (strokeTintList != null && strokeTintList.isStateful());
1070+
return super.isStateful()
1071+
|| (tintList != null && tintList.isStateful())
1072+
|| (strokeTintList != null && strokeTintList.isStateful())
1073+
|| (strokeColor != null && strokeColor.isStateful())
1074+
|| (fillColor != null && fillColor.isStateful());
10721075
}
10731076

10741077
@Override

0 commit comments

Comments
 (0)