diff --git a/vector/src/main/java/im/vector/riotx/features/themes/ActivityOtherThemes.kt b/vector/src/main/java/im/vector/riotx/features/themes/ActivityOtherThemes.kt index bd482e0b0d..4c5d8c1305 100644 --- a/vector/src/main/java/im/vector/riotx/features/themes/ActivityOtherThemes.kt +++ b/vector/src/main/java/im/vector/riotx/features/themes/ActivityOtherThemes.kt @@ -21,9 +21,10 @@ import im.vector.riotx.R /** * Class to manage Activity other possible themes. - * Note that style for light theme is default and is declared in the Android Manifest + * Note that style for light theme is no more default and is no more declared in the Android Manifest */ -sealed class ActivityOtherThemes(@StyleRes val dark: Int, +sealed class ActivityOtherThemes(@StyleRes val light: Int, + @StyleRes val dark: Int, @StyleRes val black: Int, @StyleRes val status: Int, @StyleRes val sc_light: Int, @@ -33,6 +34,7 @@ sealed class ActivityOtherThemes(@StyleRes val dark: Int, @StyleRes val sc_dark_colored: Int) { object Default : ActivityOtherThemes( + R.style.AppTheme_Light, R.style.AppTheme_Dark, R.style.AppTheme_Black, R.style.AppTheme_Status, @@ -47,6 +49,7 @@ sealed class ActivityOtherThemes(@StyleRes val dark: Int, R.style.AppTheme_AttachmentsPreview, R.style.AppTheme_AttachmentsPreview, R.style.AppTheme_AttachmentsPreview, + R.style.AppTheme_AttachmentsPreview, R.style.AppTheme_AttachmentsPreview_SC, R.style.AppTheme_AttachmentsPreview_SC, R.style.AppTheme_AttachmentsPreview_SC, @@ -58,6 +61,7 @@ sealed class ActivityOtherThemes(@StyleRes val dark: Int, R.style.AppTheme_Transparent, R.style.AppTheme_Transparent, R.style.AppTheme_Transparent, + R.style.AppTheme_Transparent, R.style.AppTheme_Transparent_SC, R.style.AppTheme_Transparent_SC, R.style.AppTheme_Transparent_SC, diff --git a/vector/src/main/java/im/vector/riotx/features/themes/ThemeUtils.kt b/vector/src/main/java/im/vector/riotx/features/themes/ThemeUtils.kt index 396757da97..2926f0694a 100644 --- a/vector/src/main/java/im/vector/riotx/features/themes/ThemeUtils.kt +++ b/vector/src/main/java/im/vector/riotx/features/themes/ThemeUtils.kt @@ -147,6 +147,7 @@ object ThemeUtils { fun setApplicationTheme(context: Context, aLightTheme: String, aDarkTheme: String) { val aTheme = if (useDarkTheme(context)) aDarkTheme else aLightTheme when (aTheme) { + THEME_LIGHT_VALUE -> context.setTheme(R.style.AppTheme_Light) THEME_DARK_VALUE -> context.setTheme(R.style.AppTheme_Dark) THEME_BLACK_VALUE -> context.setTheme(R.style.AppTheme_Black) THEME_STATUS_VALUE -> context.setTheme(R.style.AppTheme_Status) @@ -177,6 +178,7 @@ object ThemeUtils { */ fun setActivityTheme(activity: Activity, otherThemes: ActivityOtherThemes) { when (getApplicationTheme(activity)) { + THEME_LIGHT_VALUE -> activity.setTheme(otherThemes.light) THEME_DARK_VALUE -> activity.setTheme(otherThemes.dark) THEME_BLACK_VALUE -> activity.setTheme(otherThemes.black) THEME_STATUS_VALUE -> activity.setTheme(otherThemes.status)