diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java index bed2251c84fd23..5d19b871392431 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java @@ -1106,8 +1106,8 @@ private void drawRectangularBackgroundWithBorders(Canvas canvas) { int width = Math.round(borderWidth.left); updatePathEffect(width); mPaint.setStrokeWidth(width); - mPathForSingleBorder.moveTo(left, top - borderWidth.top / 2); - mPathForSingleBorder.lineTo(left, bottom + borderWidth.bottom / 2); + mPathForSingleBorder.moveTo(left + width / 2, top); + mPathForSingleBorder.lineTo(left + width / 2, bottom); canvas.drawPath(mPathForSingleBorder, mPaint); } if (borderTop > 0) { @@ -1115,8 +1115,8 @@ private void drawRectangularBackgroundWithBorders(Canvas canvas) { int width = Math.round(borderWidth.top); updatePathEffect(width); mPaint.setStrokeWidth(width); - mPathForSingleBorder.moveTo(left, top); - mPathForSingleBorder.lineTo(right, top); + mPathForSingleBorder.moveTo(left, top + width / 2); + mPathForSingleBorder.lineTo(right, top + width / 2); canvas.drawPath(mPathForSingleBorder, mPaint); } if (borderRight > 0) { @@ -1124,8 +1124,8 @@ private void drawRectangularBackgroundWithBorders(Canvas canvas) { int width = Math.round(borderWidth.right); updatePathEffect(width); mPaint.setStrokeWidth(width); - mPathForSingleBorder.moveTo(right, top - borderWidth.top / 2); - mPathForSingleBorder.lineTo(right, bottom + borderWidth.bottom / 2); + mPathForSingleBorder.moveTo(right - width / 2, top); + mPathForSingleBorder.lineTo(right - width / 2, bottom); canvas.drawPath(mPathForSingleBorder, mPaint); } if (borderBottom > 0) { @@ -1133,8 +1133,8 @@ private void drawRectangularBackgroundWithBorders(Canvas canvas) { int width = Math.round(borderWidth.bottom); updatePathEffect(width); mPaint.setStrokeWidth(width); - mPathForSingleBorder.moveTo(left, bottom); - mPathForSingleBorder.lineTo(right, bottom); + mPathForSingleBorder.moveTo(left, bottom - width / 2); + mPathForSingleBorder.lineTo(right, bottom - width / 2); canvas.drawPath(mPathForSingleBorder, mPaint); } }