Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5133792 authored by Alan Viverette's avatar Alan Viverette
Browse files

Update drawable state after updating tint list

BUG: 18155988
Change-Id: Ic536027a54c10b2082fbc22476530165b76e2c59
parent e2502eb9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -16353,6 +16353,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                if (tintInfo.mHasTintMode) {
                    mBackground.setTintMode(tintInfo.mTintMode);
                }
                // The drawable (or one of its children) may not have been
                // stateful before applying the tint, so let's try again.
                if (mBackground.isStateful()) {
                    mBackground.setState(getDrawableState());
                }
            }
        }
    }
+6 −0
Original line number Diff line number Diff line
@@ -267,6 +267,12 @@ public abstract class AbsSeekBar extends ProgressBar {
            if (mHasThumbTintMode) {
                mThumb.setTintMode(mThumbTintMode);
            }

            // The drawable (or one of its children) may not have been
            // stateful before applying the tint, so let's try again.
            if (mThumb.isStateful()) {
                mThumb.setState(getDrawableState());
            }
        }
    }

+6 −0
Original line number Diff line number Diff line
@@ -267,6 +267,12 @@ public class CheckedTextView extends TextView implements Checkable {
            if (mHasCheckMarkTintMode) {
                mCheckMarkDrawable.setTintMode(mCheckMarkTintMode);
            }

            // The drawable (or one of its children) may not have been
            // stateful before applying the tint, so let's try again.
            if (mCheckMarkDrawable.isStateful()) {
                mCheckMarkDrawable.setState(getDrawableState());
            }
        }
    }

+6 −0
Original line number Diff line number Diff line
@@ -315,6 +315,12 @@ public abstract class CompoundButton extends Button implements Checkable {
            if (mHasButtonTintMode) {
                mButtonDrawable.setTintMode(mButtonTintMode);
            }

            // The drawable (or one of its children) may not have been
            // stateful before applying the tint, so let's try again.
            if (mButtonDrawable.isStateful()) {
                mButtonDrawable.setState(getDrawableState());
            }
        }
    }

+6 −0
Original line number Diff line number Diff line
@@ -384,6 +384,12 @@ public class FrameLayout extends ViewGroup {
            if (mHasForegroundTintMode) {
                mForeground.setTintMode(mForegroundTintMode);
            }

            // The drawable (or one of its children) may not have been
            // stateful before applying the tint, so let's try again.
            if (mForeground.isStateful()) {
                mForeground.setState(getDrawableState());
            }
        }
    }

Loading