Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/com/owncloud/android/utils/theme/ViewThemeUtils.kt')
-rw-r--r--app/src/main/java/com/owncloud/android/utils/theme/ViewThemeUtils.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/com/owncloud/android/utils/theme/ViewThemeUtils.kt b/app/src/main/java/com/owncloud/android/utils/theme/ViewThemeUtils.kt
index 38da91860b..8bb94cf4cb 100644
--- a/app/src/main/java/com/owncloud/android/utils/theme/ViewThemeUtils.kt
+++ b/app/src/main/java/com/owncloud/android/utils/theme/ViewThemeUtils.kt
@@ -52,4 +52,17 @@ class ViewThemeUtils @Inject constructor(
@JvmField
val files = FilesSpecificViewThemeUtils(schemes, colorUtil, platform, androidx)
+
+ class Factory @Inject constructor(
+ private val schemesProvider: MaterialSchemesProvider,
+ private val colorUtil: ColorUtil
+ ) {
+ fun withSchemes(schemes: MaterialSchemes): ViewThemeUtils {
+ return ViewThemeUtils(schemes, colorUtil)
+ }
+
+ fun withDefaultSchemes(): ViewThemeUtils {
+ return withSchemes(schemesProvider.getDefaultMaterialSchemes())
+ }
+ }
}