mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
am 05e809c8: am 1d18ce0b: am d375274c: am 76c2add1: am 83e76aa2: am c1392c0f: Merge "Mutate FAB backgrounds before tinting" into lmp-mr1-ub-dev
* commit '05e809c871b64b9a79381e1f3a0436748f436050': Mutate FAB backgrounds before tinting GitOrigin-RevId=e6044a99864aef98a04e89a7685e859b9fd9bef5 PiperOrigin-RevId: 140549420
This commit is contained in:
parent
74c3dff7bb
commit
7e8fde62b7
@ -68,7 +68,7 @@ class FloatingActionButtonEclairMr1 extends FloatingActionButtonImpl {
|
||||
PorterDuff.Mode backgroundTintMode, int rippleColor, int borderWidth) {
|
||||
// Now we need to tint the original background with the tint, using
|
||||
// an InsetDrawable if we have a border width
|
||||
mShapeDrawable = DrawableCompat.wrap(originalBackground);
|
||||
mShapeDrawable = DrawableCompat.wrap(originalBackground.mutate());
|
||||
DrawableCompat.setTintList(mShapeDrawable, backgroundTint);
|
||||
if (backgroundTintMode != null) {
|
||||
DrawableCompat.setTintMode(mShapeDrawable, backgroundTintMode);
|
||||
|
||||
@ -54,7 +54,7 @@ class FloatingActionButtonLollipop extends FloatingActionButtonHoneycombMr1 {
|
||||
void setBackgroundDrawable(Drawable originalBackground, ColorStateList backgroundTint,
|
||||
PorterDuff.Mode backgroundTintMode, int rippleColor, int borderWidth) {
|
||||
// Now we need to tint the original background with the tint
|
||||
mShapeDrawable = DrawableCompat.wrap(originalBackground);
|
||||
mShapeDrawable = DrawableCompat.wrap(originalBackground.mutate());
|
||||
DrawableCompat.setTintList(mShapeDrawable, backgroundTint);
|
||||
if (backgroundTintMode != null) {
|
||||
DrawableCompat.setTintMode(mShapeDrawable, backgroundTintMode);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user