From e4a30b241af619c692a9cafa020dfa99c73d73b5 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Wed, 23 Jul 2025 19:05:53 +0200 Subject: [PATCH] feat(bgnd): Add background color theming Signed-off-by: Andy Scherzinger --- .../common/ui/theme/utils/AndroidViewThemeUtils.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/src/main/java/com/nextcloud/android/common/ui/theme/utils/AndroidViewThemeUtils.kt b/ui/src/main/java/com/nextcloud/android/common/ui/theme/utils/AndroidViewThemeUtils.kt index d6af058f..5a611067 100644 --- a/ui/src/main/java/com/nextcloud/android/common/ui/theme/utils/AndroidViewThemeUtils.kt +++ b/ui/src/main/java/com/nextcloud/android/common/ui/theme/utils/AndroidViewThemeUtils.kt @@ -628,6 +628,15 @@ class AndroidViewThemeUtils } } + fun themeViewBackground( + view: View, + colorRole: ColorRole = ColorRole.SURFACE + ) { + withScheme(view) { scheme -> + view.setBackgroundColor(colorRole.select(scheme)) + } + } + @JvmOverloads fun highlightText( textView: TextView,