Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Fix header overlay darkness on API 11 and lower #110

Merged
AdamGrzybkowski merged 5 commits intotrunkfrom
adam/GRA-724
Aug 14, 2025
Merged

Fix header overlay darkness on API 11 and lower #110
AdamGrzybkowski merged 5 commits intotrunkfrom
adam/GRA-724

Conversation

@AdamGrzybkowski
Copy link
Contributor

Description

The .blur Modifier we use to blur the header image works only on API 12 and higher. We have an additional overlay with Color.Black(alpha = 0.15f) but that wasn't enough without the blur. The first commit ba92a80 changes the alpha for Android 11 and lower.

Why not blur on older APIs? I've left a comment about this here. We should be able to add this, but the ProfileHeader needs some adjustments to make it look nice.

Before After
overlay_API_28_before overlay_API_28_after

This change made it more obvious that the status bar icons are not properly tinted. 019a796 commit fixes that by setting a proper status bar appearance. I create a new Screen component that handles this logic, so each screen component should use this one as a wrapper now. This will come in handy for the Screen analytics events as well.

Before After
status_bar_before light_status_bar_after

Additionally, I've noticed that forcing a dark theme on the Profile header forces the dark theme on the TopBarPickerPopup component. This was fixed here as well.

Before After
popup_menu_before popup_menu_after

Testing Steps

  1. Launch the app on API 11 or lower and test the header overlay.
  2. Switch the device to light mode and open the top menu in the app - confirm it uses light mode as well.
  3. Verify that the status bar icons are always white in the headers (Profile, Avatar and Share tabs), regardless of the device's dark/light mode. LoginScreen should set the appearance based on the device's color mode, the icons should change the color.

@AdamGrzybkowski AdamGrzybkowski added the bug Something isn't working label Aug 13, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes header overlay darkness on Android API 11 and lower by adjusting the alpha overlay and introduces proper status bar appearance management across screens. The main changes address blur functionality limitations on older Android versions and ensure consistent UI theming.

  • Increased overlay alpha from 0.15f to 0.6f for API < 32 to compensate for missing blur effect
  • Added a new Screen component to manage status bar appearance consistently across the app
  • Fixed theme inheritance issues in popup menus by wrapping components with appropriate theme providers

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
BlurredHeaderBackground.kt Adjusts overlay alpha based on Android API level to compensate for blur limitations
Screen.kt New component for managing status bar appearance across screens
LoginScreen.kt Wraps content with Screen component using default status bar appearance
ProfileScreen.kt Wraps content with Screen component forcing light status bars to false
ShareScreen.kt Wraps content with Screen component forcing light status bars to false
GravatarScreen.kt Wraps content with Screen component forcing light status bars to false
GravatarHeader.kt Wraps header content with dark theme to ensure consistent appearance
ShareHeader.kt Wraps header content with dark theme to ensure consistent appearance
TopBarPickerPopup.kt Wraps popup with GravatarTheme to prevent theme inheritance issues

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Looking great!

I've seen the new light status bar and the correct color of the menu on the main menu.

I couldn't test the darkened header in the older API.
@pinarol - could you take a fast look at this one? I've run the on-demand build.

@wpmobilebot
Copy link

wpmobilebot commented Aug 14, 2025

📲 You can test the changes from this Pull Request in Gravatar Android by scanning the QR code below to install the corresponding build.
App NameGravatar Android
Build TypeRelease
Commit33bc526
Direct Downloadgravatar-app-prototype-build-pr110-33bc526.apk

@pinarol
Copy link
Contributor

pinarol commented Aug 14, 2025

I observe the same thing with my Android 9 device 🎉

@AdamGrzybkowski AdamGrzybkowski merged commit d7f5c37 into trunk Aug 14, 2025
10 checks passed
@AdamGrzybkowski AdamGrzybkowski deleted the adam/GRA-724 branch August 14, 2025 11:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants