Skip to content

Feature/edge to edge support#1317

Open
mano-kotdev wants to merge 2 commits into
AppIntro:mainfrom
mano-kotdev:feature/edge_to_edge_support
Open

Feature/edge to edge support#1317
mano-kotdev wants to merge 2 commits into
AppIntro:mainfrom
mano-kotdev:feature/edge_to_edge_support

Conversation

@mano-kotdev

Copy link
Copy Markdown

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.

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 cortinico left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ: Why do we need to wrap everything inside a FrameLayout. Is that because otherwise setOnApplyWindowInsetsListener won't work?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cortinico cortinico requested a review from paolorotolo October 21, 2025 18:11
@cortinico

Copy link
Copy Markdown
Member

@paolorotolo are you able to do a pass on this one as well?

@Slion

Slion commented Nov 3, 2025

Copy link
Copy Markdown

I appreciate the credits but if we are going to merge my solution I rather work on it myself.

@cortinico

Copy link
Copy Markdown
Member

I appreciate the credits but if we are going to merge my solution I rather work on it myself.

Please open a PR then 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants