Skip to content

[LEIP-480] Fix status bar visibility in edge-to-edge mode#128

Merged
hb0 merged 2 commits intomainfrom
task/LEIP-408_fix-top-bar-has-white-background
Dec 6, 2025
Merged

[LEIP-480] Fix status bar visibility in edge-to-edge mode#128
hb0 merged 2 commits intomainfrom
task/LEIP-408_fix-top-bar-has-white-background

Conversation

@hb0
Copy link
Contributor

@hb0 hb0 commented Dec 6, 2025

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 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.
@hb0 hb0 self-assigned this Dec 6, 2025
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.
@hb0 hb0 merged commit e833476 into main Dec 6, 2025
3 checks passed
@hb0 hb0 deleted the task/LEIP-408_fix-top-bar-has-white-background branch December 6, 2025 05:40
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