fix(ui): handle edge-to-edge system bars and icon contrast - #90
Open
Mystery00 wants to merge 2 commits into
Open
fix(ui): handle edge-to-edge system bars and icon contrast#90Mystery00 wants to merge 2 commits into
Mystery00 wants to merge 2 commits into
Conversation
Assisted-by: OpenAI Codex
Assisted-by: OpenAI Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes two edge-to-edge UI issues:
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:
:app:assembleDebugsuccessfully.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.