Skip to content

Commit

Permalink
new themes
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Oct 26, 2023
1 parent 20bea76 commit 1eb85d4
Show file tree
Hide file tree
Showing 6 changed files with 272 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fun updateProgress(media: Media, number: String) {
if (Anilist.userid != null) {
CoroutineScope(Dispatchers.IO).launch {
val a = number.toFloatOrNull()?.roundToInt()
if (a != media.userProgress) {
if ((a?:0) > (media.userProgress?:0)) {
Anilist.mutation.editList(
media.id,
a,
Expand Down
18 changes: 13 additions & 5 deletions app/src/main/java/ani/dantotsu/themes/ThemeManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ class ThemeManager(private val context: Context) {
"PURPLE" -> {
context.setTheme(R.style.Theme_Dantotsu_Purple)
}
//"MONOCHROME" -> {
// context.setTheme(R.style.Theme_Dantotsu_Monochrome)
//}
"BLUE" -> {
context.setTheme(R.style.Theme_Dantotsu_Blue)
}
Expand All @@ -24,6 +21,15 @@ class ThemeManager(private val context: Context) {
"PINK" -> {
context.setTheme(R.style.Theme_Dantotsu_Pink)
}
"RED" -> {
context.setTheme(R.style.Theme_Dantotsu_Red)
}
"LAVENDER" -> {
context.setTheme(R.style.Theme_Dantotsu_Lavender)
}
"MONOCHROME (BETA)" -> {
context.setTheme(R.style.Theme_Dantotsu_Monochrome)
}
else -> {
context.setTheme(R.style.Theme_Dantotsu_Purple)
}
Expand All @@ -35,8 +41,10 @@ class ThemeManager(private val context: Context) {
PURPLE("PURPLE"),
BLUE("BLUE"),
GREEN("GREEN"),
PINK("PINK");
//MONOCHROME("MONOCHROME");
PINK("PINK"),
RED("RED"),
LAVENDER("LAVENDER"),
MONOCHROME("MONOCHROME (BETA)");

companion object {
fun fromString(value: String): Theme {
Expand Down
58 changes: 58 additions & 0 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,62 @@
<item name="colorSurfaceInverse">@color/bg_white</item>
<item name="colorPrimaryInverse">@color/bg_black</item>
</style>

<style name="Theme.Dantotsu.Red" parent="Theme.Base">
<item name="colorPrimary">@color/md_0_theme_dark_primary</item>
<item name="colorOnPrimary">@color/md_0_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_0_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_0_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_0_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/md_0_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_0_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_0_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_0_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/md_0_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_0_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_0_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/md_0_theme_dark_error</item>
<item name="colorErrorContainer">@color/md_0_theme_dark_errorContainer</item>
<item name="colorOnError">@color/md_0_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/md_0_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/md_0_theme_dark_background</item>
<item name="colorOnBackground">@color/md_0_theme_dark_onBackground</item>
<item name="colorSurface">@color/md_0_theme_dark_surface</item>
<item name="colorOnSurface">@color/md_0_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/md_0_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_0_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/md_0_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/md_0_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_0_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_0_theme_dark_inversePrimary</item>
</style>

<style name="Theme.Dantotsu.Lavender" parent="Theme.Base">
<item name="colorPrimary">@color/md_1_theme_dark_primary</item>
<item name="colorOnPrimary">@color/md_1_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_1_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_1_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_1_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/md_1_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_1_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_1_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_1_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/md_1_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_1_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_1_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/md_1_theme_dark_error</item>
<item name="colorErrorContainer">@color/md_1_theme_dark_errorContainer</item>
<item name="colorOnError">@color/md_1_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/md_1_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/md_1_theme_dark_background</item>
<item name="colorOnBackground">@color/md_1_theme_dark_onBackground</item>
<item name="colorSurface">@color/md_1_theme_dark_surface</item>
<item name="colorOnSurface">@color/md_1_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/md_1_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_1_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/md_1_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/md_1_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_1_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_1_theme_dark_inversePrimary</item>
</style>
</resources>
129 changes: 129 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<color name="warning">#FF0000</color>
<color name="grey_20">#444444</color>
<color name="grey_60">#999999</color>
<color name="darkest_Black">#030201</color>

<!-- theme 1 -->
<color name="seed_1">#00658e</color>
Expand Down Expand Up @@ -269,4 +270,132 @@
<color name="md_theme_dark_4_surfaceTint">#FFAED9</color>
<color name="md_theme_dark_4_outlineVariant">#504349</color>
<color name="md_theme_dark_4_scrim">#000000</color>

<color name="seed_5">#c9000b</color>
<color name="md_0_theme_light_primary">#C0000A</color>
<color name="md_0_theme_light_onPrimary">#FFFFFF</color>
<color name="md_0_theme_light_primaryContainer">#FFDAD5</color>
<color name="md_0_theme_light_onPrimaryContainer">#410001</color>
<color name="md_0_theme_light_secondary">#775652</color>
<color name="md_0_theme_light_onSecondary">#FFFFFF</color>
<color name="md_0_theme_light_secondaryContainer">#FFDAD5</color>
<color name="md_0_theme_light_onSecondaryContainer">#2C1512</color>
<color name="md_0_theme_light_tertiary">#705C2E</color>
<color name="md_0_theme_light_onTertiary">#FFFFFF</color>
<color name="md_0_theme_light_tertiaryContainer">#FCDFA6</color>
<color name="md_0_theme_light_onTertiaryContainer">#261A00</color>
<color name="md_0_theme_light_error">#BA1A1A</color>
<color name="md_0_theme_light_errorContainer">#FFDAD6</color>
<color name="md_0_theme_light_onError">#FFFFFF</color>
<color name="md_0_theme_light_onErrorContainer">#410002</color>
<color name="md_0_theme_light_background">#FFFBFF</color>
<color name="md_0_theme_light_onBackground">#201A19</color>
<color name="md_0_theme_light_surface">#FFFBFF</color>
<color name="md_0_theme_light_onSurface">#201A19</color>
<color name="md_0_theme_light_surfaceVariant">#F5DDDA</color>
<color name="md_0_theme_light_onSurfaceVariant">#534341</color>
<color name="md_0_theme_light_outline">#857370</color>
<color name="md_0_theme_light_inverseOnSurface">#FBEEEC</color>
<color name="md_0_theme_light_inverseSurface">#362F2E</color>
<color name="md_0_theme_light_inversePrimary">#FFB4AA</color>
<color name="md_0_theme_light_shadow">#000000</color>
<color name="md_0_theme_light_surfaceTint">#C0000A</color>
<color name="md_0_theme_light_outlineVariant">#D8C2BE</color>
<color name="md_0_theme_light_scrim">#000000</color>
<color name="md_0_theme_dark_primary">#FFB4AA</color>
<color name="md_0_theme_dark_onPrimary">#690003</color>
<color name="md_0_theme_dark_primaryContainer">#930005</color>
<color name="md_0_theme_dark_onPrimaryContainer">#FFDAD5</color>
<color name="md_0_theme_dark_secondary">#E7BDB7</color>
<color name="md_0_theme_dark_onSecondary">#442926</color>
<color name="md_0_theme_dark_secondaryContainer">#5D3F3B</color>
<color name="md_0_theme_dark_onSecondaryContainer">#FFDAD5</color>
<color name="md_0_theme_dark_tertiary">#DFC38C</color>
<color name="md_0_theme_dark_onTertiary">#3E2E04</color>
<color name="md_0_theme_dark_tertiaryContainer">#574419</color>
<color name="md_0_theme_dark_onTertiaryContainer">#FCDFA6</color>
<color name="md_0_theme_dark_error">#FFB4AB</color>
<color name="md_0_theme_dark_errorContainer">#93000A</color>
<color name="md_0_theme_dark_onError">#690005</color>
<color name="md_0_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="md_0_theme_dark_background">#201A19</color>
<color name="md_0_theme_dark_onBackground">#EDE0DE</color>
<color name="md_0_theme_dark_surface">#201A19</color>
<color name="md_0_theme_dark_onSurface">#EDE0DE</color>
<color name="md_0_theme_dark_surfaceVariant">#534341</color>
<color name="md_0_theme_dark_onSurfaceVariant">#D8C2BE</color>
<color name="md_0_theme_dark_outline">#A08C89</color>
<color name="md_0_theme_dark_inverseOnSurface">#201A19</color>
<color name="md_0_theme_dark_inverseSurface">#EDE0DE</color>
<color name="md_0_theme_dark_inversePrimary">#C0000A</color>
<color name="md_0_theme_dark_shadow">#000000</color>
<color name="md_0_theme_dark_surfaceTint">#FFB4AA</color>
<color name="md_0_theme_dark_outlineVariant">#534341</color>
<color name="md_0_theme_dark_scrim">#000000</color>

<color name="seed_6">#6750A4</color>
<color name="md_1_theme_light_primary">#6750A4</color>
<color name="md_1_theme_light_onPrimary">#FFFFFF</color>
<color name="md_1_theme_light_primaryContainer">#E9DDFF</color>
<color name="md_1_theme_light_onPrimaryContainer">#22005D</color>
<color name="md_1_theme_light_secondary">#625B71</color>
<color name="md_1_theme_light_onSecondary">#FFFFFF</color>
<color name="md_1_theme_light_secondaryContainer">#E8DEF8</color>
<color name="md_1_theme_light_onSecondaryContainer">#1E192B</color>
<color name="md_1_theme_light_tertiary">#7E5260</color>
<color name="md_1_theme_light_onTertiary">#FFFFFF</color>
<color name="md_1_theme_light_tertiaryContainer">#FFD9E3</color>
<color name="md_1_theme_light_onTertiaryContainer">#31101D</color>
<color name="md_1_theme_light_error">#BA1A1A</color>
<color name="md_1_theme_light_errorContainer">#FFDAD6</color>
<color name="md_1_theme_light_onError">#FFFFFF</color>
<color name="md_1_theme_light_onErrorContainer">#410002</color>
<color name="md_1_theme_light_background">#FFFBFF</color>
<color name="md_1_theme_light_onBackground">#1C1B1E</color>
<color name="md_1_theme_light_surface">#FFFBFF</color>
<color name="md_1_theme_light_onSurface">#1C1B1E</color>
<color name="md_1_theme_light_surfaceVariant">#E7E0EB</color>
<color name="md_1_theme_light_onSurfaceVariant">#49454E</color>
<color name="md_1_theme_light_outline">#7A757F</color>
<color name="md_1_theme_light_inverseOnSurface">#F4EFF4</color>
<color name="md_1_theme_light_inverseSurface">#313033</color>
<color name="md_1_theme_light_inversePrimary">#CFBCFF</color>
<color name="md_1_theme_light_shadow">#000000</color>
<color name="md_1_theme_light_surfaceTint">#6750A4</color>
<color name="md_1_theme_light_outlineVariant">#CAC4CF</color>
<color name="md_1_theme_light_scrim">#000000</color>
<color name="md_1_theme_dark_primary">#CFBCFF</color>
<color name="md_1_theme_dark_onPrimary">#381E72</color>
<color name="md_1_theme_dark_primaryContainer">#4F378A</color>
<color name="md_1_theme_dark_onPrimaryContainer">#E9DDFF</color>
<color name="md_1_theme_dark_secondary">#CBC2DB</color>
<color name="md_1_theme_dark_onSecondary">#332D41</color>
<color name="md_1_theme_dark_secondaryContainer">#4A4458</color>
<color name="md_1_theme_dark_onSecondaryContainer">#E8DEF8</color>
<color name="md_1_theme_dark_tertiary">#EFB8C8</color>
<color name="md_1_theme_dark_onTertiary">#4A2532</color>
<color name="md_1_theme_dark_tertiaryContainer">#633B48</color>
<color name="md_1_theme_dark_onTertiaryContainer">#FFD9E3</color>
<color name="md_1_theme_dark_error">#FFB4AB</color>
<color name="md_1_theme_dark_errorContainer">#93000A</color>
<color name="md_1_theme_dark_onError">#690005</color>
<color name="md_1_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="md_1_theme_dark_background">#1C1B1E</color>
<color name="md_1_theme_dark_onBackground">#E6E1E6</color>
<color name="md_1_theme_dark_surface">#1C1B1E</color>
<color name="md_1_theme_dark_onSurface">#E6E1E6</color>
<color name="md_1_theme_dark_surfaceVariant">#49454E</color>
<color name="md_1_theme_dark_onSurfaceVariant">#CAC4CF</color>
<color name="md_1_theme_dark_outline">#948F99</color>
<color name="md_1_theme_dark_inverseOnSurface">#1C1B1E</color>
<color name="md_1_theme_dark_inverseSurface">#E6E1E6</color>
<color name="md_1_theme_dark_inversePrimary">#6750A4</color>
<color name="md_1_theme_dark_shadow">#000000</color>
<color name="md_1_theme_dark_surfaceTint">#CFBCFF</color>
<color name="md_1_theme_dark_outlineVariant">#49454E</color>
<color name="md_1_theme_dark_scrim">#000000</color>
<color name="CustomColor1">#93DB00</color>
<color name="CustomColor2">#68AF86</color>
<color name="CustomColor3">#0096AE</color>
<color name="CustomColor4">#000000</color>
</resources>
57 changes: 57 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,5 +217,62 @@
<item name="colorPrimaryInverse">@color/bg_white</item>
</style>

<style name="Theme.Dantotsu.Red" parent="Theme.Base">
<item name="colorPrimary">@color/md_0_theme_light_primary</item>
<item name="colorOnPrimary">@color/md_0_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_0_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_0_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_0_theme_light_secondary</item>
<item name="colorOnSecondary">@color/md_0_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_0_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_0_theme_light_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_0_theme_light_tertiary</item>
<item name="colorOnTertiary">@color/md_0_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_0_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_0_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/md_0_theme_light_error</item>
<item name="colorErrorContainer">@color/md_0_theme_light_errorContainer</item>
<item name="colorOnError">@color/md_0_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/md_0_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/md_0_theme_light_background</item>
<item name="colorOnBackground">@color/md_0_theme_light_onBackground</item>
<item name="colorSurface">@color/md_0_theme_light_surface</item>
<item name="colorOnSurface">@color/md_0_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/md_0_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_0_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/md_0_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/md_0_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_0_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_0_theme_light_inversePrimary</item>
</style>

<style name="Theme.Dantotsu.Lavender" parent="Theme.Base">
<item name="colorPrimary">@color/md_1_theme_light_primary</item>
<item name="colorOnPrimary">@color/md_1_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_1_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_1_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_1_theme_light_secondary</item>
<item name="colorOnSecondary">@color/md_1_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_1_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_1_theme_light_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_1_theme_light_tertiary</item>
<item name="colorOnTertiary">@color/md_1_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_1_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_1_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/md_1_theme_light_error</item>
<item name="colorErrorContainer">@color/md_1_theme_light_errorContainer</item>
<item name="colorOnError">@color/md_1_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/md_1_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/md_1_theme_light_background</item>
<item name="colorOnBackground">@color/md_1_theme_light_onBackground</item>
<item name="colorSurface">@color/md_1_theme_light_surface</item>
<item name="colorOnSurface">@color/md_1_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/md_1_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_1_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/md_1_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/md_1_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_1_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/md_1_theme_light_inversePrimary</item>
</style>

</resources>
Loading

0 comments on commit 1eb85d4

Please sign in to comment.