-
-
Notifications
You must be signed in to change notification settings - Fork 7
Introduce unified safeArea property #12
-
Since there is a need for multiple safe area modifications I came to this thought.
Would it make sense if there was a single safeArea property that accepts types?
Here is an example in the form of xml:
<GridLayout iosSafeArea="normal"/><!-- default, usually no need to set -->
<GridLayout iosSafeArea="overflow"/>
<GridLayout iosSafeArea="ignore"/>
Of course, this would be a problem for users that already use existing overflow property.
Originally posted by @dimitrisrk in NativeScript/NativeScript#9092 (comment)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 2 replies
-
@dimitrisrk I like it - however I wonder if we should just use safeArea="..." opening up the possibility to implement on Android in the future (if required).
Either way it'd be a breaking change - but the migration would be easy - so I'd say we could go for it in 8.0
Originally posted in NativeScript/NativeScript#9092 (comment)
Beta Was this translation helpful? Give feedback.
All reactions
-
Another thought: we could introduce this in 8.0 and alias the old iosOverflowSafeArea property to it and mark it deprecated until the next major, giving people time to refactor without breaking anything.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Possible implementation for Android: https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat
Beta Was this translation helpful? Give feedback.
All reactions
-
I'm a little late to the party here, but PlayStore is now forcing new and updated apps to target SDK 35, and this will enable edge-to-edge by default: https://developer.android.com/develop/ui/views/layout/edge-to-edge
Having built in support for this for Android as we do for iOS would be amazing.
Beta Was this translation helpful? Give feedback.