Skip to content

Commit e4a30b2

Browse files
feat(bgnd): Add background color theming
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent b78c50e commit e4a30b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ui/src/main/java/com/nextcloud/android/common/ui/theme/utils/AndroidViewThemeUtils.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,15 @@ class AndroidViewThemeUtils
628628
}
629629
}
630630

631+
fun themeViewBackground(
632+
view: View,
633+
colorRole: ColorRole = ColorRole.SURFACE
634+
) {
635+
withScheme(view) { scheme ->
636+
view.setBackgroundColor(colorRole.select(scheme))
637+
}
638+
}
639+
631640
@JvmOverloads
632641
fun highlightText(
633642
textView: TextView,

0 commit comments

Comments
 (0)