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

Commit 467226f

Browse files
committed
Parent Frame for older API versions
1 parent a27e58f commit 467226f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Xamarin.Forms.ControlGallery.Android/Tests/CornerRadiusTests.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ public void ImageButtonCornerRadius()
6464
HeightRequest = 100,
6565
WidthRequest = 200,
6666
CornerRadius = 15,
67-
BackgroundColor = backgroundColor
67+
BackgroundColor = backgroundColor,
68+
BorderColor = Color.Black,
69+
BorderWidth = 2
6870
};
6971

7072
CheckCornerRadius(button);
@@ -77,12 +79,17 @@ public void CheckCornerRadius(VisualElement visualElement)
7779
var view = renderer.View;
7880
Layout(visualElement, view);
7981

82+
// Need to parent the Frame for it to work on lower APIs (below Marshmallow)
83+
ParentView(view);
84+
8085
// The corners should show the background color
8186
view.AssertColorAtTopLeft(EmptyBackground)
8287
.AssertColorAtTopRight(EmptyBackground)
8388
.AssertColorAtBottomLeft(EmptyBackground)
8489
.AssertColorAtBottomRight(EmptyBackground)
8590
.AssertColorAtCenter(visualElement.BackgroundColor.ToAndroid());
91+
92+
UnparentView(view);
8693
}
8794
}
8895
}

0 commit comments

Comments
 (0)