Skip to content

Support edge-to-edge rendering on Android Q+ - #146

Merged
d4rken merged 12 commits into
d4rken-org:mainfrom
Seanathan10:main
Jul 4, 2023
Merged

Support edge-to-edge rendering on Android Q+#146
d4rken merged 12 commits into
d4rken-org:mainfrom
Seanathan10:main

Conversation

@Seanathan10

Copy link
Copy Markdown
Contributor

Hello!

This app has been insanely helpful for using AirPods on Android. However, it was missing one small detail: edge-to-edge rendering. Since the release of gesture navigation with Android Q (10), apps can render below the navigation bar for a cleaner and more modern look. I've done this with CAPod and was hoping my changes can be merged with the main repository to provide this experience to all who find and use this app. Here's the difference with using edge-to-edge rendering:

No edge-to-edge

Edge-to-Edge

MainPageOld There is this unsightly default black box around the nav pill MainPageNew Clean!
SettingsOld The black box blocks content SettingsNew Clean! And text below it is now visible
MainPageLandscapeOld Landscape mode has the same issues MainPageLandscapeNew But also gets the same benefits
PixelXL-DarkOld The previous photos were running on a Pixel 7 (Android 13) PixelXL-DarkNew Here it is on a 2016 Pixel XL (Android 10) in dark theme, and shows 3 button nav compatbility

One of the things I haven't tackled in this pull request is rendering below the camera cutout when in landscape mode. For the purposes of streamlining, I didn't do that yet. I simply wanted to make the app look slightly cleaner.

Please let me know if you have any questions or concerns regarding my changes. I hope this can get merged!

@d4rken d4rken 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.

Looks good on my device ❤️ , I'm open to adding it. Just a few comments where I would like to hear your thoughts.

Comment thread app-common/src/main/java/eu/darken/capod/common/uix/Activity2.kt Outdated
Comment thread app/src/main/java/eu/darken/capod/main/ui/overview/OverviewFragment.kt Outdated
Comment thread app/src/main/res/values-night/themes.xml
Comment thread app/src/main/res/xml/preferences_general.xml
Comment thread app/src/main/res/values/themes.xml Outdated
<item name="colorPrimaryInverse">@color/md_theme_light_primaryInverse</item>

<item name="android:navigationBarColor">
#B3000000

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.

What do you think about using a color variable here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Forgot to reply here earlier, but I had just left this here as a fallback for anything below Android 10. Was removed in later commits as it wasn't necessary.

Comment thread app/src/main/res/values-v29/themes.xml Outdated
@d4rken d4rken added the enhancement Add a new feature of improve an existing feature label Jul 3, 2023
@d4rken
d4rken merged commit 669fa2f into d4rken-org:main Jul 4, 2023
@d4rken

d4rken commented Jul 4, 2023

Copy link
Copy Markdown
Member

lgtm 👍

@Mastersoffgamingart Mastersoffgamingart left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Labels

enhancement Add a new feature of improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants