-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Safe Area handling for iOS #2001
Conversation
@@ -6,7 +6,7 @@ namespace Microsoft.Maui | |||
/// Provides the base properties and methods for all Layout elements. | |||
/// Use Layout elements to position and size child elements in .NET MAUI applications. | |||
/// </summary> | |||
public interface ILayout : IView, IContainer | |||
public interface ILayout : IView, IContainer, ISafeAreaView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of having this on ILayout
as opposed to IView
?
I am thinking that for most people, a IScrollView
might be the root? Also, for a game/drawn app, the root may be a canvas/graphics view?
@@ -6,6 +6,7 @@ namespace Microsoft.Maui.Layouts | |||
public interface ILayoutManager | |||
{ | |||
Size Measure(double widthConstraint, double heightConstraint); | |||
Size ArrangeChildren(Rectangle childBounds); | |||
|
|||
Size ArrangeChildren(Size finalSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an FYI that this is an ABI break for P7 that may break layout implementors. So we may have to let them know before we release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We can add the interface to IView later.
Adds the ISafeAreaView interface to ILayout (and to Page in Controls).
Page implements ISafeAreaView.IgnoreSafeArea via the
UseSafeArea
platform specific.Handle safe area offset checking for LayoutView and PageView.
Also fixes incorrect parameter type for ILayoutManager.ArrangeChildren (Rectangle -> Size).