Use CLAMP instead of MIRROR

This matches the behavior on iOS where the gradient’s edge color is
extended if the view’s bounds exceed the gradient positions.
This commit is contained in:
Jonathan Chang
2016-09-14 23:09:28 -07:00
parent 2cb5bc019f
commit 6db9cbc0a9
@@ -90,7 +90,7 @@ public class LinearGradientView extends View {
mEndPos[1] * mSize[1],
mColors,
mLocations,
Shader.TileMode.MIRROR);
Shader.TileMode.CLAMP);
mPaint.setShader(mShader);
invalidate();
}