mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix dashed/dotted border drawing when border-radius is 0 (#28359)
Summary: This PR fixes the border-style that is not respected when drawing a border with 0 border-radius on Android. This would cause the faster `drawRectangularBackgroundWithBorders` path to be used, but that uses rectangular drawing and doesn't support dashed/dotted stroke patterns. This PR changes the behavior to use the generic `drawRoundedBackgroundWithBorders` code-path which does support dashed/dotted border-styles. ## Changelog `[Android] [Fixed] - Fix dashed/dotted border-drawing when border-radius is 0` Pull Request resolved: https://github.com/facebook/react-native/pull/28359 Test Plan: **Faulty situation:**  **After the fix:**  Reviewed By: lunaleaps Differential Revision: D20590739 Pulled By: charlesbdudley fbshipit-source-id: 18657ea21e54f763e22c623bf979b3500c1bdcbd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
913448f179
commit
3e5998e651
+1
-1
@@ -129,7 +129,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
updatePathEffect();
|
||||
if (!hasRoundedBorders()) {
|
||||
if (!hasRoundedBorders() && mBorderStyle == BorderStyle.SOLID) {
|
||||
drawRectangularBackgroundWithBorders(canvas);
|
||||
} else {
|
||||
drawRoundedBackgroundWithBorders(canvas);
|
||||
|
||||
Reference in New Issue
Block a user