Skip to content

Commit 80ae3cf

Browse files
fix-15154-Adjusted inset constraints to respect view margins in FlyoutItem and updated Android snapshot.
1 parent 94eff8e commit 80ae3cf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/UIContainerCell.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ internal UIContainerCell(string cellId, View view, Shell shell, object context)
3333
platformView.AccessibilityTraits |= UIAccessibilityTrait.Button;
3434
platformView.TranslatesAutoresizingMaskIntoConstraints = false;
3535

36-
ContentView.LeadingAnchor.ConstraintEqualTo(platformView.LeadingAnchor).Active = true;
37-
ContentView.TrailingAnchor.ConstraintEqualTo(platformView.TrailingAnchor).Active = true;
38-
ContentView.TopAnchor.ConstraintEqualTo(platformView.TopAnchor).Active = true;
39-
ContentView.BottomAnchor.ConstraintEqualTo(platformView.BottomAnchor).Active = true;
36+
var margin = view.Margin;
37+
platformView.LeadingAnchor.ConstraintEqualTo(ContentView.LeadingAnchor, (nfloat)margin.Left).Active = true;
38+
platformView.TrailingAnchor.ConstraintEqualTo(ContentView.TrailingAnchor, (nfloat)(-margin.Right)).Active = true;
39+
platformView.TopAnchor.ConstraintEqualTo(ContentView.TopAnchor, (nfloat)margin.Top).Active = true;
40+
platformView.BottomAnchor.ConstraintEqualTo(ContentView.BottomAnchor, (nfloat)(-margin.Bottom)).Active = true;
4041

4142
_renderer.PlatformView.ClipsToBounds = true;
4243
ContentView.ClipsToBounds = true;
28.3 KB
Loading

0 commit comments

Comments
 (0)