Feature/edge to edge support#1317
Conversation
Grouped bottom user interfaces inside a frame layout to apply necessary margins and to address immersive edge-to-edge experience.
Rolled back status bar visibility to default value.
cortinico
left a comment
There was a problem hiding this comment.
Thanks for sending this over.
Would you be able to attach a video of before/after for reference?
| @@ -1,59 +1,66 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
| <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
There was a problem hiding this comment.
QQ: Why do we need to wrap everything inside a FrameLayout. Is that because otherwise setOnApplyWindowInsetsListener won't work?
There was a problem hiding this comment.
The FrameLayout isn’t required for setOnApplyWindowInsetsListener - it works on any view.
Having the ConstraintLayout with padding and background is usually enough.
The reason I wrapped everything inside a FrameLayout is to let the outer container handle the background and draw it behind the system bars, while the inner ConstraintLayout focuses on the actual UI and applies the padding from the window insets.
|
@paolorotolo are you able to do a pass on this one as well? |
|
I appreciate the credits but if we are going to merge my solution I rather work on it myself. |
Please open a PR then 🙏 |
This PR resolves issue #1263 by implementing edge-to-edge support, ensuring the app's UI extends behind the system bars for a more modern and immersive experience.
This was achieved by using ViewCompat.setOnApplyWindowInsetsListener to dynamically adjust the margins of the slide's container based on the system's window insets.
Acknowledgments
A big thank you to Slion for their initial work and proposed solution on their fork. This implementation is heavily based on their extensive testing and code, which was instrumental in resolving this issue.