diff --git a/app/src/main/java/com/lagradost/cloudstream3/CommonActivity.kt b/app/src/main/java/com/lagradost/cloudstream3/CommonActivity.kt
index 49143498..8f22c01a 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/CommonActivity.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/CommonActivity.kt
@@ -166,6 +166,8 @@ object CommonActivity {
"Light" -> R.style.LightMode
"Amoled" -> R.style.AmoledMode
"AmoledLight" -> R.style.AmoledModeLight
+ "Monet" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
+ R.style.MonetMode else R.style.AppTheme
else -> R.style.AppTheme
}
@@ -186,6 +188,10 @@ object CommonActivity {
"Banana" -> R.style.OverlayPrimaryColorBanana
"Party" -> R.style.OverlayPrimaryColorParty
"Pink" -> R.style.OverlayPrimaryColorPink
+ "Monet" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
+ R.style.OverlayPrimaryColorMonet else R.style.OverlayPrimaryColorNormal
+ "Monet2" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
+ R.style.OverlayPrimaryColorMonetTwo else R.style.OverlayPrimaryColorNormal
else -> R.style.OverlayPrimaryColorNormal
}
act.theme.applyStyle(currentTheme, true)
diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt
index 9ad3ee8f..e2fd24ca 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt
@@ -1,5 +1,6 @@
package com.lagradost.cloudstream3.ui.settings
+import android.os.Build
import android.os.Bundle
import android.view.View
import androidx.preference.PreferenceFragmentCompat
@@ -83,8 +84,20 @@ class SettingsUI : PreferenceFragmentCompat() {
}
getPref(R.string.app_theme_key)?.setOnPreferenceClickListener {
- val prefNames = resources.getStringArray(R.array.themes_names)
- val prefValues = resources.getStringArray(R.array.themes_names_values)
+ val prefNames = resources.getStringArray(R.array.themes_names).toMutableList()
+ val prefValues = resources.getStringArray(R.array.themes_names_values).toMutableList()
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { // remove monet on android 11 and less
+ val toRemove = prefValues
+ .mapIndexed { idx, s -> if (s.startsWith("Monet")) idx else null }
+ .filterNotNull()
+ var offset = 0
+ toRemove.forEach { idx ->
+ prefNames.removeAt(idx - offset)
+ prefValues.removeAt(idx - offset)
+ offset += 1
+ }
+ }
val currentLayout =
settingsManager.getString(getString(R.string.app_theme_key), prefValues.first())
@@ -107,8 +120,20 @@ class SettingsUI : PreferenceFragmentCompat() {
return@setOnPreferenceClickListener true
}
getPref(R.string.primary_color_key)?.setOnPreferenceClickListener {
- val prefNames = resources.getStringArray(R.array.themes_overlay_names)
- val prefValues = resources.getStringArray(R.array.themes_overlay_names_values)
+ val prefNames = resources.getStringArray(R.array.themes_overlay_names).toMutableList()
+ val prefValues = resources.getStringArray(R.array.themes_overlay_names_values).toMutableList()
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { // remove monet on android 11 and less
+ val toRemove = prefValues
+ .mapIndexed { idx, s -> if (s.startsWith("Monet")) idx else null }
+ .filterNotNull()
+ var offset = 0
+ toRemove.forEach { idx ->
+ prefNames.removeAt(idx - offset)
+ prefValues.removeAt(idx - offset)
+ offset += 1
+ }
+ }
val currentLayout =
settingsManager.getString(getString(R.string.primary_color_key), prefValues.first())
diff --git a/app/src/main/res/values-es/array.xml b/app/src/main/res/values-es/array.xml
index 658ba7ae..ae986642 100644
--- a/app/src/main/res/values-es/array.xml
+++ b/app/src/main/res/values-es/array.xml
@@ -14,19 +14,6 @@
- @id/cast_button_type_forward_30_seconds
-
- - Todos
- - Películas y TV
- - Anime
- - Documental
-
-
- - 0
- - 1
- - 2
- - 3
-
-
- @string/resolution_and_title
- @string/title
@@ -222,6 +209,8 @@
- Banana
- Fiesta
- Dolor rosa
+ - Material You
+ - Material You (Secondary)
- Normal
@@ -240,19 +229,24 @@
- Banana
- Party
- Pink
+ - Monet
+ - Monet2
+
- Oscuro
- Gris
- Amoled
- Destello
+ - Material You
- AmoledLight
- Black
- Amoled
- Light
+ - Monet
diff --git a/app/src/main/res/values-pl/array.xml b/app/src/main/res/values-pl/array.xml
index c40b7f87..3fe30d95 100644
--- a/app/src/main/res/values-pl/array.xml
+++ b/app/src/main/res/values-pl/array.xml
@@ -218,6 +218,8 @@
- Bananowy
- Łososiowy
- Świnko peppowy
+ - Material You
+ - Material You (drugorzędny)
- Normal
@@ -236,19 +238,24 @@
- Banana
- Party
- Pink
+ - Monet
+ - Monet2
+
- Ciemny
- Szary
- Amoled
- Flashbang
+ - Material You
- AmoledLight
- Black
- Amoled
- Light
+ - Monet
diff --git a/app/src/main/res/values-tr/array.xml b/app/src/main/res/values-tr/array.xml
index ec9acd0e..dbb17d36 100644
--- a/app/src/main/res/values-tr/array.xml
+++ b/app/src/main/res/values-tr/array.xml
@@ -14,19 +14,6 @@
- @id/cast_button_type_forward_30_seconds
-
- - Hepsi
- - Film ve Dizi
- - Anime
- - Belgesel
-
-
- - 0
- - 1
- - 2
- - 3
-
-
- @string/resolution_and_title
- @string/title
@@ -222,6 +209,8 @@
- Muz
- Parti
- Pembe
+ - Material You
+ - Material You (Secondary)
- Normal
@@ -240,19 +229,24 @@
- Banana
- Party
- Pink
+ - Monet
+ - Monet2
+
- Koyu
- Gri
- Amoled
- Flaş Bombası
+ - Material You
- AmoledLight
- Black
- Amoled
- Light
+ - Monet
diff --git a/app/src/main/res/values-vi/array.xml b/app/src/main/res/values-vi/array.xml
index 5e70223b..5fee2d29 100644
--- a/app/src/main/res/values-vi/array.xml
+++ b/app/src/main/res/values-vi/array.xml
@@ -14,18 +14,6 @@
- @id/cast_button_type_forward_30_seconds
-
- - Tất cả
- - Phim lẻ và Phim bộ
- - Anime
- - Phim tài liệu
-
-
- - 0
- - 1
- - 2
- - 3
-
- @string/resolution_and_title
@@ -222,6 +210,8 @@
- Vàng
- Hồng
- Hồng đậm
+ - Material You
+ - Material You (Secondary)
- Normal
@@ -240,19 +230,24 @@
- Banana
- Party
- Pink
+ - Monet
+ - Monet2
+
- Tối
- Xám
- Amoled
- Sáng
+ - Material You
- AmoledLight
- Black
- Amoled
- Light
+ - Monet
diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml
index 13d4f2dc..fedc4219 100644
--- a/app/src/main/res/values/array.xml
+++ b/app/src/main/res/values/array.xml
@@ -228,6 +228,8 @@
- Banana
- Party
- Pink Pain
+ - Material You
+ - Material You (Secondary)
- Normal
@@ -246,6 +248,8 @@
- Banana
- Party
- Pink
+ - Monet
+ - Monet2
@@ -253,12 +257,14 @@
- Gray
- Amoled
- Flashbang
+ - Material You
- AmoledLight
- Black
- Amoled
- Light
+ - Monet
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 2fb9b5b4..9840cb80 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -95,6 +95,16 @@
- #000
+
+
+
+
+
+