Fixing crash on pre-api level 19 devices due to getAlpha() call on Drawable.

Bug: 24173665
Change-Id: Ia59481dc7fb52454760c688ba49c90b8507d7900
This commit is contained in:
Winson
2015-09-18 09:57:21 -07:00
committed by Winson Chung
parent 3186058153
commit 605156bd87

View File

@@ -35,6 +35,7 @@ class TransformedImageDrawable {
private float mXPercent;
private float mYPercent;
private int mGravity;
private int mAlpha;
/**
* @param gravity If one of the Gravity center values, the x and y offset will take the width
@@ -50,10 +51,11 @@ class TransformedImageDrawable {
public void setAlpha(int alpha) {
mImage.setAlpha(alpha);
mAlpha = alpha;
}
public int getAlpha() {
return mImage.getAlpha();
return mAlpha;
}
public void updateBounds(Rect bounds) {