Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 738e291

Browse files
authored
Fixed incorrect small border applying a SolidColorBrush in some cases (#11761)
1 parent 32d2fd4 commit 738e291

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Xamarin.Forms.Platform.Android/Extensions/BrushExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,16 @@ internal static void SetPaintGradient(this AView view, Brush brush)
187187
Shape = new RectShape()
188188
};
189189

190+
gradientStrokeDrawable.SetStroke(0, Color.Default.ToAndroid());
191+
190192
if (brush is SolidColorBrush solidColorBrush)
191193
{
192194
var color = solidColorBrush.Color.IsDefault ? Color.Default.ToAndroid() : solidColorBrush.Color.ToAndroid();
193195
gradientStrokeDrawable.SetColor(color);
194196
}
195197
else
196-
{
197-
gradientStrokeDrawable.SetStroke(0, Color.Default.ToAndroid());
198198
gradientStrokeDrawable.SetGradient(brush);
199-
}
199+
200200
view.Background?.Dispose();
201201
view.Background = gradientStrokeDrawable;
202202
}

0 commit comments

Comments
 (0)