From ff77456f26c6aac9fe5bfbcb3fefd6fa6c3d61ba Mon Sep 17 00:00:00 2001 From: Denis Koroskin Date: Tue, 22 Dec 2015 11:46:59 -0800 Subject: [PATCH] Fix DrawBorder now updating color for left border, drawing it with old color Summary: There is a small bug in DrawBorder where we forget updating color for a left border, which makes the border draw with whatever color was previously set to the Paint. This diff fixes it by updating the color. Reviewed By: ahmedre Differential Revision: D2779511 --- .../src/main/java/com/facebook/react/flat/DrawBorder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/flat/DrawBorder.java b/ReactAndroid/src/main/java/com/facebook/react/flat/DrawBorder.java index 64ddf555a..e9070c7f0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/flat/DrawBorder.java +++ b/ReactAndroid/src/main/java/com/facebook/react/flat/DrawBorder.java @@ -237,6 +237,7 @@ import com.facebook.csslayout.Spacing; float rightOfTheLeft = getLeft() + leftWidth; int leftColor = resolveBorderColor(BORDER_LEFT_COLOR_SET, mBorderLeftColor, defaultColor); if (Color.alpha(leftColor) != 0 && leftWidth != 0) { + PAINT.setColor(leftColor); canvas.drawRect(getLeft(), bottomOfTheTop, rightOfTheLeft, topOfTheBottom, PAINT); }