diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index c6586ecfceb9d..45b2de5f4b31d 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -784,7 +784,9 @@ public class GradientDrawable extends Drawable { mFillPaint.setDither(st.mDither); mFillPaint.setColorFilter(colorFilter); if (colorFilter != null && st.mSolidColors == null) { - mFillPaint.setColor(mAlpha << 24); + // If we don't have a solid color and we don't have a gradient, + // the app is stroking the shape, set the color to transparent + mFillPaint.setColor(st.mGradientColors != null ? mAlpha << 24 : 0); } if (haveStroke) { mStrokePaint.setAlpha(currStrokeAlpha);