Skip to content

fix(ui): handle edge-to-edge system bars and icon contrast - #90

Open
Mystery00 wants to merge 2 commits into
kitsumed:mainfrom
Mystery00:codex/fix-system-bar-insets
Open

fix(ui): handle edge-to-edge system bars and icon contrast#90
Mystery00 wants to merge 2 commits into
kitsumed:mainfrom
Mystery00:codex/fix-system-bar-insets

Conversation

@Mystery00

Copy link
Copy Markdown

Summary

This PR fixes two edge-to-edge UI issues:

  • Screen content could be drawn underneath the status bar because the full-screen Compose layouts only applied navigation bar padding.
  • Status and navigation bar icons remained light in the app's light theme, making them difficult to see against the light background.

The change applies safe drawing insets to the content of the Disclaimer, Permissions, Settings, and Sponsor screens while allowing their background surfaces to continue drawing behind the system bars.

It also explicitly enables edge-to-edge mode and synchronizes the status/navigation bar icon appearance with the active app theme. The icon handling supports both the main Activity window and the separate window used by the full-screen Sponsor dialog.

No new dependencies were added.

Screenshots

Before: status bar overlapping content on a physical device

图片

The Settings title was rendered underneath the status bar.

Before: system bar icons in light mode on the API 37 emulator

图片

After extending the page background behind the system bars, the icons still used their light appearance and had insufficient contrast against the light background.

After: light theme

图片

The content respects the safe drawing area, the page background extends behind the system bars, and the system bar icons use their dark appearance.

After: dark theme

图片

The same edge-to-edge layout is preserved while the system bar icons switch back to their light appearance.

Edge-to-edge behavior

For apps targeting recent Android versions, edge-to-edge causes the app window to draw behind the system bars. The app is responsible for applying appropriate window insets to interactive content while allowing backgrounds to extend into those areas.

This PR uses Compose safe drawing insets for content placement instead of opting out of edge-to-edge behavior.

Relevant Android documentation:

Testing

Tested with a debug build on an API 37 emulator at 1280 × 2856:

  • Verified the Settings and Permissions screens.
  • Verified that content remains outside the status and navigation bar safe areas.
  • Verified that the page background extends behind both system bars.
  • Verified system bar icon contrast in light and dark themes.
  • Verified icon contrast in the full-screen Sponsor dialog.
  • Ran :app:assembleDebug successfully.

Personal usage feedback

As a Pixel user in mainland China, I use the device in a region where Google provides very limited localization and user-experience support. Call recording is a standard built-in feature on many phones sold in China. Although Xposed and root-based solutions have made it possible to add this functionality to Pixel devices, the side effects of using Xposed or root have become increasingly significant as Android has grown more restrictive.

That makes the non-root approach used by this project especially valuable. I have been using ShizuCallRecorder for about two months, and it has reliably recorded my calls. Everything has worked correctly for me, apart from the UI being obscured by the status bar. XD

Thank you for discovering this non-root approach and for learning the Android development knowledge needed to build and maintain this app. I hope contributions like this can provide a small amount of help in keeping Android useful and open as the platform becomes increasingly restrictive.

AI assistance disclosure

This contribution was made at my request. I explicitly authorized Codex to investigate and implement the changes and, after approval, to create the pull request using my GitHub account.

Because I am not confident writing in English, I provided the original descriptions in Chinese and used ChatGPT/Codex to translate and polish the PR text. I personally reviewed and approved the implementation, emulator test results, screenshots, and final PR description before submission.

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.

1 participant