Skip to content

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Feb 9, 2026

Not sure about the fallback colors

  • Removes ThemeColorUtils and all related usages from DrawerActivity, ToolbarActivity, and dependency injection modules.
  • Migrates header and icon theming to use ColorUtil with tone-based contrast logic for improved visual consistency and maintainability.
  • Cleans up DI modules and deletes redundant code.

And addresses these lint warnings:

w: file:///home/runner/work/android/android/app/src/main/java/com/nextcloud/client/di/ThemeModule.kt:13:8 'class ThemeColorUtils : Any' is deprecated. Deprecated in Java.
w: file:///home/runner/work/android/android/app/src/main/java/com/nextcloud/client/di/ThemeModule.kt:30:32 'class ThemeColorUtils : Any' is deprecated. Deprecated in Java.
w: file:///home/runner/work/android/android/app/src/main/java/com/nextcloud/client/di/ThemeModule.kt:30:50 'constructor(): ThemeColorUtils' is deprecated. Deprecated in Java.

Related context: PR #10717

Theming/Drawer Branding PR Test Checklist

  • Drawer header background uses correct branding color (from server or fallback)
  • Drawer header server name text is readable against all possible background colors
  • Drawer header logo is rendered and positioned properly
  • Ecosystem banner icons and adjacent text have correct color contrast in all branding scenarios
  • Switching server branding colors (light, dark, saturated, invalid, unset) updates UI correctly
  • Fallback color is used (no visual bugs) if server branding color is missing or invalid
  • App appears correct in both light and dark mode
  • No crashes or rendering issues after logging into/out of Nextcloud accounts with/without branding
  • Drawer and banner appearance is correct for branded and unbranded builds, and when banner is hidden by preference
  • Multi-account scenarios: branding and contrast are correct per account

Optional:

  • Test on multiple Android versions and screen sizes

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🏁 Checklist

  • Tests written, or not not needed

…ity header and banner colors

Update DrawerActivity to use ColorUtil and a unified tone-based contrast check for setting ecosystem icon colors and server name text color, ensuring robust fallback and improved legibility with all server branding themes.

Drops reliance on deprecated ThemeColorUtils.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16492.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Codacy

SpotBugs

CategoryBaseNew
Bad practice4242
Correctness7474
Dodgy code257257
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4444
Security1818
Total479479

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@joshtrichards joshtrichards marked this pull request as ready for review February 9, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant