Skip to content
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

Fix: Edge to edge #91

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix: Edge to edge #91

wants to merge 3 commits into from

Conversation

KCeh
Copy link
Collaborator

@KCeh KCeh commented Dec 31, 2024

Summary

Fix for issue #86
Now Sentinel's UI should be ok on API 35 devices in regards to edge to edge

Changes

  • Bumped compile and target SDK to 35
  • Fixed compile issues with SDK 35
  • Bumped Chucker to version that has fixed edge to edge
  • Fixed edge to edge in Sentinel fullscreen screens android:fitsSystemWindows="true"

Type

  • Feature: This pull request introduces a new feature.
  • Bug fix: This pull request fixes a bug.
  • Refactor: This pull request refactors existing code.
  • Documentation: This pull request updates documentation.
  • Other: This pull request makes other changes.

Additional information

  • This pull request introduces a breaking change.

Description

As mentioned I focused on most intrusive part of issue (you can't see/click on top bar).
There might be room to improve things even further: sample app edge to edge support? bottom padding support? and bottom sheet is now floating a bit weirdly.
If you have suggestions how to improve things, feel free to mention them

Checklist

  • I have performed a self-review of my own code.
  • I have tested my changes, including edge cases.
  • I have added necessary tests for the changes introduced (if applicable).
  • I have updated the documentation to reflect my changes (if applicable).

Additional notes

Before:
before-6
before-5
before-4
before-3
before-2
before-1

After:
after.webm

@KCeh KCeh added bug Something isn't working enhancement New feature or request labels Dec 31, 2024
@KCeh KCeh requested a review from AsimRibo December 31, 2024 14:38
@KCeh KCeh self-assigned this Dec 31, 2024
Copy link
Contributor

@AsimRibo AsimRibo left a comment

Choose a reason for hiding this comment

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

Having troubles using this version of Sentinel on another project. I will re-check it and get back to you.

Copy link
Contributor

@AsimRibo AsimRibo left a comment

Choose a reason for hiding this comment

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


Activity methods signatures were changed so I had to update them on the other project.
This solves a good portion of edge to edge problems but we will need to add additional updates later.

@@ -8,6 +8,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:fitsSystemWindows="true"
Copy link
Contributor

@AsimRibo AsimRibo Jan 7, 2025

Choose a reason for hiding this comment

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

Shouldn't fitsSystemWindows go to root parent so it handles both top and bottom insets?

@KCeh
Copy link
Collaborator Author

KCeh commented Jan 7, 2025

This solves a good portion of edge to edge problems but we will need to add additional updates later.

We are in no rush, so maybe we can handle everything here?
What needs to be done?

Shouldn't fitsSystemWindows go to root parent so it handles both top and bottom insets?

🤔 we can test it that way

@AsimRibo
Copy link
Contributor

AsimRibo commented Jan 7, 2025

This solves a good portion of edge to edge problems but we will need to add additional updates later.

We are in no rush, so maybe we can handle everything here? What needs to be done?

Shouldn't fitsSystemWindows go to root parent so it handles both top and bottom insets?

🤔 we can test it that way

In Sentinel BaseActivity we need to call enableEdgeToEdge(), otherwise edge to edge will be enforced only on Android 15 by default. Currently, Android < 15 is still not edge to edge.

I double checked regarding fitsSystemWindows and from what I see, it should be in root parent view but that is causing us troubles with system toolbar so I wouldn't touch it right now. As you can see in video below, when edge to edge is enabled system navigation bar appears semi-transparent but it's not a huge deal.

We also need to figure out why toolbar is changing color, I don't think this was intended, but looks ok for now.

Take_Screenshot

Same steps can be applied to sample app as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants