Skip to content

Commit

Permalink
feat: Added 2 themes light purple and pink color
Browse files Browse the repository at this point in the history
  • Loading branch information
PHANTOMLOCAL authored and SyntaxGalaxy committed Sep 3, 2023
1 parent 2ae7986 commit e14ed5c
Show file tree
Hide file tree
Showing 5 changed files with 303 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,30 @@ public void initThemeList() {
Setting.Key.Theme, MaterialColorHelper.AppTheme6, this);
refreshActivityIfRequired();
});

View theme7 = getLayoutInflater().inflate(R.layout.theme_chooser_item, null);
theme7.findViewById(R.id.color).setBackgroundResource(R.color.theme_7_md_theme_light_primary);
((ViewGroup) findViewById(R.id.themes)).addView(theme7);
theme7
.findViewById(R.id.color)
.setOnClickListener(
(view) -> {
Setting.SaveInFile.setSetting(
Setting.Key.Theme, MaterialColorHelper.AppTheme7, this);
refreshActivityIfRequired();
});

View theme8 = getLayoutInflater().inflate(R.layout.theme_chooser_item, null);
theme8.findViewById(R.id.color).setBackgroundResource(R.color.theme_8_md_theme_light_primary);
((ViewGroup) findViewById(R.id.themes)).addView(theme8);
theme8
.findViewById(R.id.color)
.setOnClickListener(
(view) -> {
Setting.SaveInFile.setSetting(
Setting.Key.Theme, MaterialColorHelper.AppTheme8, this);
refreshActivityIfRequired();
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class MaterialColorHelper {
public static final String AppTheme4 = "AppTheme4";
public static final String AppTheme5 = "AppTheme5";
public static final String AppTheme6 = "AppTheme6";
public static final String AppTheme7 = "AppTheme7";
public static final String AppTheme8 = "AppTheme8";

public static void setUpTheme(Context context) {
context.setTheme(getCurrentTheme(context));
Expand All @@ -54,7 +56,13 @@ public static int getCurrentTheme(Context context) {
break;
case AppTheme6:
theme = R.style.AppTheme6;
break;
break;
case AppTheme7:
theme = R.style.AppTheme7;
break;
case AppTheme8:
theme = R.style.AppTheme8;
break;
default:
return R.style.AppTheme;
}
Expand Down
74 changes: 74 additions & 0 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,78 @@
tools:targetApi="q">false</item>
</style>

<style
name="AppTheme7"
parent="Theme.Material3.Dark.NoActionBar">
<item name="colorPrimary">@color/theme_7_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/theme_7_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/theme_7_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/theme_7_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/theme_7_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/theme_7_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/theme_7_md_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/theme_7_md_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/theme_7_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/theme_7_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/theme_7_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/theme_7_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/theme_7_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/theme_7_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/theme_7_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/theme_7_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/theme_7_md_theme_dark_background</item>
<item name="colorOnBackground">@color/theme_7_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/theme_7_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/theme_7_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/theme_7_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/theme_7_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/theme_7_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/theme_7_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/theme_7_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/theme_7_md_theme_dark_inversePrimary</item>

<item name="android:windowLightStatusBar">false</item>
<item name="android:statusBarColor">@color/theme_7_md_theme_dark_surface</item>
<item
name="android:forceDarkAllowed"
tools:targetApi="q">false</item>
</style>

<style
name="AppTheme8"
parent="Theme.Material3.Dark.NoActionBar">
<item name="colorPrimary">@color/theme_8_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/theme_8_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/theme_8_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/theme_8_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/theme_8_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/theme_8_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/theme_8_md_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/theme_8_md_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/theme_8_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/theme_8_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/theme_8_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/theme_8_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/theme_8_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/theme_8_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/theme_8_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/theme_8_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/theme_8_md_theme_dark_background</item>
<item name="colorOnBackground">@color/theme_8_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/theme_8_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/theme_8_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/theme_8_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/theme_8_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/theme_8_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/theme_8_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/theme_8_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/theme_8_md_theme_dark_inversePrimary</item>

<item name="android:windowLightStatusBar">false</item>
<item name="android:statusBarColor">@color/theme_8_md_theme_dark_surface</item>
<item
name="android:forceDarkAllowed"
tools:targetApi="q">false</item>
</style>

</resources>
122 changes: 122 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,126 @@
<color name="theme_6_md_theme_dark_outlineVariant">#42474E</color>
<color name="theme_6_md_theme_dark_scrim">#000000</color>

<color name="theme_7_md_theme_light_primary">#794A99</color>
<color name="theme_7_md_theme_light_onPrimary">#FFFFFF</color>
<color name="theme_7_md_theme_light_primaryContainer">#F4DAFF</color>
<color name="theme_7_md_theme_light_onPrimaryContainer">#2F004C</color>
<color name="theme_7_md_theme_light_secondary">#675A6E</color>
<color name="theme_7_md_theme_light_onSecondary">#FFFFFF</color>
<color name="theme_7_md_theme_light_secondaryContainer">#EFDCF5</color>
<color name="theme_7_md_theme_light_onSecondaryContainer">#221729</color>
<color name="theme_7_md_theme_light_tertiary">#815154</color>
<color name="theme_7_md_theme_light_onTertiary">#FFFFFF</color>
<color name="theme_7_md_theme_light_tertiaryContainer">#FFDADA</color>
<color name="theme_7_md_theme_light_onTertiaryContainer">#331014</color>
<color name="theme_7_md_theme_light_error">#BA1A1A</color>
<color name="theme_7_md_theme_light_errorContainer">#FFDAD6</color>
<color name="theme_7_md_theme_light_onError">#FFFFFF</color>
<color name="theme_7_md_theme_light_onErrorContainer">#410002</color>
<color name="theme_7_md_theme_light_background">#FFFBFF</color>
<color name="theme_7_md_theme_light_onBackground">#1D1B1E</color>
<color name="theme_7_md_theme_light_surface">#FFFBFF</color>
<color name="theme_7_md_theme_light_onSurface">#1D1B1E</color>
<color name="theme_7_md_theme_light_surfaceVariant">#EADFEA</color>
<color name="theme_7_md_theme_light_onSurfaceVariant">#4B454D</color>
<color name="theme_7_md_theme_light_outline">#7C747E</color>
<color name="theme_7_md_theme_light_inverseOnSurface">#F6EFF3</color>
<color name="theme_7_md_theme_light_inverseSurface">#332F33</color>
<color name="theme_7_md_theme_light_inversePrimary">#E3B5FF</color>
<color name="theme_7_md_theme_light_shadow">#000000</color>
<color name="theme_7_md_theme_light_surfaceTint">#794A99</color>
<color name="theme_7_md_theme_light_outlineVariant">#CDC3CE</color>
<color name="theme_7_md_theme_light_scrim">#000000</color>
<color name="theme_7_md_theme_dark_primary">#E3B5FF</color>
<color name="theme_7_md_theme_dark_onPrimary">#471867</color>
<color name="theme_7_md_theme_dark_primaryContainer">#60317F</color>
<color name="theme_7_md_theme_dark_onPrimaryContainer">#F4DAFF</color>
<color name="theme_7_md_theme_dark_secondary">#D2C1D8</color>
<color name="theme_7_md_theme_dark_onSecondary">#382C3E</color>
<color name="theme_7_md_theme_dark_secondaryContainer">#4F4256</color>
<color name="theme_7_md_theme_dark_onSecondaryContainer">#EFDCF5</color>
<color name="theme_7_md_theme_dark_tertiary">#F4B7B9</color>
<color name="theme_7_md_theme_dark_onTertiary">#4C2527</color>
<color name="theme_7_md_theme_dark_tertiaryContainer">#663B3D</color>
<color name="theme_7_md_theme_dark_onTertiaryContainer">#FFDADA</color>
<color name="theme_7_md_theme_dark_error">#FFB4AB</color>
<color name="theme_7_md_theme_dark_errorContainer">#93000A</color>
<color name="theme_7_md_theme_dark_onError">#690005</color>
<color name="theme_7_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="theme_7_md_theme_dark_background">#1D1B1E</color>
<color name="theme_7_md_theme_dark_onBackground">#E7E0E5</color>
<color name="theme_7_md_theme_dark_surface">#1D1B1E</color>
<color name="theme_7_md_theme_dark_onSurface">#E7E0E5</color>
<color name="theme_7_md_theme_dark_surfaceVariant">#4B454D</color>
<color name="theme_7_md_theme_dark_onSurfaceVariant">#CDC3CE</color>
<color name="theme_7_md_theme_dark_outline">#978E98</color>
<color name="theme_7_md_theme_dark_inverseOnSurface">#1D1B1E</color>
<color name="theme_7_md_theme_dark_inverseSurface">#E7E0E5</color>
<color name="theme_7_md_theme_dark_inversePrimary">#794A99</color>
<color name="theme_7_md_theme_dark_shadow">#000000</color>
<color name="theme_7_md_theme_dark_surfaceTint">#E3B5FF</color>
<color name="theme_7_md_theme_dark_outlineVariant">#4B454D</color>
<color name="theme_7_md_theme_dark_scrim">#000000</color>

<color name="theme_8_md_theme_light_primary">#934078</color>
<color name="theme_8_md_theme_light_onPrimary">#FFFFFF</color>
<color name="theme_8_md_theme_light_primaryContainer">#FFD8EC</color>
<color name="theme_8_md_theme_light_onPrimaryContainer">#3B002D</color>
<color name="theme_8_md_theme_light_secondary">#705765</color>
<color name="theme_8_md_theme_light_onSecondary">#FFFFFF</color>
<color name="theme_8_md_theme_light_secondaryContainer">#FBD9EA</color>
<color name="theme_8_md_theme_light_onSecondaryContainer">#281521</color>
<color name="theme_8_md_theme_light_tertiary">#80543E</color>
<color name="theme_8_md_theme_light_onTertiary">#FFFFFF</color>
<color name="theme_8_md_theme_light_tertiaryContainer">#FFDBCB</color>
<color name="theme_8_md_theme_light_onTertiaryContainer">#311303</color>
<color name="theme_8_md_theme_light_error">#BA1A1A</color>
<color name="theme_8_md_theme_light_errorContainer">#FFDAD6</color>
<color name="theme_8_md_theme_light_onError">#FFFFFF</color>
<color name="theme_8_md_theme_light_onErrorContainer">#410002</color>
<color name="theme_8_md_theme_light_background">#FFFBFF</color>
<color name="theme_8_md_theme_light_onBackground">#1F1A1D</color>
<color name="theme_8_md_theme_light_surface">#FFFBFF</color>
<color name="theme_8_md_theme_light_onSurface">#1F1A1D</color>
<color name="theme_8_md_theme_light_surfaceVariant">#F0DEE5</color>
<color name="theme_8_md_theme_light_onSurfaceVariant">#4F4449</color>
<color name="theme_8_md_theme_light_outline">#81737A</color>
<color name="theme_8_md_theme_light_inverseOnSurface">#F9EEF1</color>
<color name="theme_8_md_theme_light_inverseSurface">#342F31</color>
<color name="theme_8_md_theme_light_inversePrimary">#FFAEDF</color>
<color name="theme_8_md_theme_light_shadow">#000000</color>
<color name="theme_8_md_theme_light_surfaceTint">#934078</color>
<color name="theme_8_md_theme_light_outlineVariant">#D3C2C9</color>
<color name="theme_8_md_theme_light_scrim">#000000</color>
<color name="theme_8_md_theme_dark_primary">#FFAEDF</color>
<color name="theme_8_md_theme_dark_onPrimary">#5B0E47</color>
<color name="theme_8_md_theme_dark_primaryContainer">#76285F</color>
<color name="theme_8_md_theme_dark_onPrimaryContainer">#FFD8EC</color>
<color name="theme_8_md_theme_dark_secondary">#DEBECE</color>
<color name="theme_8_md_theme_dark_onSecondary">#3F2A37</color>
<color name="theme_8_md_theme_dark_secondaryContainer">#57404D</color>
<color name="theme_8_md_theme_dark_onSecondaryContainer">#FBD9EA</color>
<color name="theme_8_md_theme_dark_tertiary">#F4BA9E</color>
<color name="theme_8_md_theme_dark_onTertiary">#4B2714</color>
<color name="theme_8_md_theme_dark_tertiaryContainer">#653D28</color>
<color name="theme_8_md_theme_dark_onTertiaryContainer">#FFDBCB</color>
<color name="theme_8_md_theme_dark_error">#FFB4AB</color>
<color name="theme_8_md_theme_dark_errorContainer">#93000A</color>
<color name="theme_8_md_theme_dark_onError">#690005</color>
<color name="theme_8_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="theme_8_md_theme_dark_background">#1F1A1D</color>
<color name="theme_8_md_theme_dark_onBackground">#EAE0E3</color>
<color name="theme_8_md_theme_dark_surface">#1F1A1D</color>
<color name="theme_8_md_theme_dark_onSurface">#EAE0E3</color>
<color name="theme_8_md_theme_dark_surfaceVariant">#4F4449</color>
<color name="theme_8_md_theme_dark_onSurfaceVariant">#D3C2C9</color>
<color name="theme_8_md_theme_dark_outline">#9C8D93</color>
<color name="theme_8_md_theme_dark_inverseOnSurface">#1F1A1D</color>
<color name="theme_8_md_theme_dark_inverseSurface">#EAE0E3</color>
<color name="theme_8_md_theme_dark_inversePrimary">#934078</color>
<color name="theme_8_md_theme_dark_shadow">#000000</color>
<color name="theme_8_md_theme_dark_surfaceTint">#FFAEDF</color>
<color name="theme_8_md_theme_dark_outlineVariant">#4F4449</color>
<color name="theme_8_md_theme_dark_scrim">#000000</color>

</resources>
Loading

0 comments on commit e14ed5c

Please sign in to comment.