[LEIP-480] Fix status bar visibility in edge-to-edge mode#128
Merged
Conversation
The status bar text and icons were appearing white on white background in Android 16's edge-to-edge mode, making only the green battery indicator visible. This was caused by the status bar appearance not being configured for light mode. Changes: - Set WindowCompat.setDecorFitsSystemWindows to false for edge-to-edge - Configure WindowInsetsControllerCompat.isAppearanceLightStatusBars = true to use dark icons/text on light backgrounds - Applied fix to all MainActivity, LoginActivity, and TermsOfUseActivity files across cyface, digural, and r4r UI modules This ensures the status bar icons and text are visible on light backgrounds while maintaining proper edge-to-edge display behavior.
The previous fix for edge-to-edge mode hardcoded the status bar appearance to light mode (dark icons), which made the status bar icons invisible in dark mode. This change detects the current theme at runtime and adapts the status bar appearance accordingly: - Light mode: dark icons/text for visibility against light backgrounds - Dark mode: light icons/text for visibility against dark backgrounds Changes applied to all three UI variants (Cyface, R4R, Digural) across MainActivity, TermsOfUseActivity, and LoginActivity.
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.
The status bar text and icons were appearing white on white background in Android 16's edge-to-edge mode, making only the green battery indicator visible. This was caused by the status bar appearance not being configured for light mode.
Changes:
This ensures the status bar icons and text are visible on light backgrounds while maintaining proper edge-to-edge display behavior.