Merge "Fix ColorStateListDrawable bounds handling" into qt-dev am: fcbde5243a
am: 1a971773e6
Change-Id: Id6e72d627981004327d7a91d0e2b146300235173
This commit is contained in:
@@ -25,6 +25,7 @@ import android.graphics.BlendMode;
|
|||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.ColorFilter;
|
import android.graphics.ColorFilter;
|
||||||
import android.graphics.PixelFormat;
|
import android.graphics.PixelFormat;
|
||||||
|
import android.graphics.Rect;
|
||||||
import android.util.MathUtils;
|
import android.util.MathUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -135,6 +136,12 @@ public class ColorStateListDrawable extends Drawable implements Drawable.Callbac
|
|||||||
return mColorDrawable.getOpacity();
|
return mColorDrawable.getOpacity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onBoundsChange(Rect bounds) {
|
||||||
|
super.onBoundsChange(bounds);
|
||||||
|
mColorDrawable.setBounds(bounds);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean onStateChange(int[] state) {
|
protected boolean onStateChange(int[] state) {
|
||||||
if (mState.mColor != null) {
|
if (mState.mColor != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user