Skip to content

Commit

Permalink
feat: Added theme light blue 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 17bf5ce commit 46b6620
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,27 @@ public void onClick(View arg0) {
.setOnClickListener(
(view) -> {
new RadioOptionChooser(
this, R.layout.layout_editor_chooser_radio_group, getString(R.string.choose_an_editor));
this,
R.layout.layout_editor_chooser_radio_group,
getString(R.string.choose_an_editor));
});

findViewById(R.id.consoleChooserContainer)
.setOnClickListener(
(view) -> {
new RadioOptionChooser(
this, R.layout.layout_console_chooser_radio_group, getString(R.string.choose_a_console_log));
this,
R.layout.layout_console_chooser_radio_group,
getString(R.string.choose_a_console_log));
});

findViewById(R.id.languageChooserContainer)
.setOnClickListener(
(view) -> {
new RadioOptionChooser(
this, R.layout.layout_language_chooser_radio_group, getString(R.string.choose_a_language));
this,
R.layout.layout_language_chooser_radio_group,
getString(R.string.choose_a_language));
});

uiMode.add("Light");
Expand Down Expand Up @@ -202,6 +208,18 @@ public void initThemeList() {
Setting.Key.Theme, MaterialColorHelper.AppTheme5, this);
refreshActivityIfRequired();
});

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class MaterialColorHelper {
public static final String AppTheme3 = "AppTheme3";
public static final String AppTheme4 = "AppTheme4";
public static final String AppTheme5 = "AppTheme5";
public static final String AppTheme6 = "AppTheme6";

public static void setUpTheme(Context context) {
context.setTheme(getCurrentTheme(context));
Expand All @@ -51,6 +52,9 @@ public static int getCurrentTheme(Context context) {
case AppTheme5:
theme = R.style.AppTheme5;
break;
case AppTheme6:
theme = R.style.AppTheme6;
break;
default:
return R.style.AppTheme;
}
Expand Down
38 changes: 38 additions & 0 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,42 @@
name="android:forceDarkAllowed"
tools:targetApi="q">false</item>
</style>

<style
name="AppTheme6"
parent="Theme.Material3.Dark.NoActionBar">
<item name="colorPrimary">@color/theme_6_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/theme_6_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/theme_6_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/theme_6_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/theme_6_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/theme_6_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/theme_6_md_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/theme_6_md_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/theme_6_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/theme_6_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/theme_6_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/theme_6_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/theme_6_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/theme_6_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/theme_6_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/theme_6_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/theme_6_md_theme_dark_background</item>
<item name="colorOnBackground">@color/theme_6_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/theme_6_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/theme_6_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/theme_6_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/theme_6_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/theme_6_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/theme_6_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/theme_6_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/theme_6_md_theme_dark_inversePrimary</item>

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

</resources>
62 changes: 61 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@
<color name="theme_4_md_theme_dark_outlineVariant">#43483F</color>
<color name="theme_4_md_theme_dark_scrim">#000000</color>


<color name="theme_5_md_theme_light_primary">#006A63</color>
<color name="theme_5_md_theme_light_onPrimary">#FFFFFF</color>
<color name="theme_5_md_theme_light_primaryContainer">#70F8EB</color>
Expand Down Expand Up @@ -314,4 +313,65 @@
<color name="theme_5_md_theme_dark_outlineVariant">#3F4947</color>
<color name="theme_5_md_theme_dark_scrim">#000000</color>

<color name="theme_6_md_theme_light_primary">#0062A1</color>
<color name="theme_6_md_theme_light_onPrimary">#FFFFFF</color>
<color name="theme_6_md_theme_light_primaryContainer">#D0E4FF</color>
<color name="theme_6_md_theme_light_onPrimaryContainer">#001D35</color>
<color name="theme_6_md_theme_light_secondary">#525F70</color>
<color name="theme_6_md_theme_light_onSecondary">#FFFFFF</color>
<color name="theme_6_md_theme_light_secondaryContainer">#D6E4F7</color>
<color name="theme_6_md_theme_light_onSecondaryContainer">#0F1C2B</color>
<color name="theme_6_md_theme_light_tertiary">#6A5779</color>
<color name="theme_6_md_theme_light_onTertiary">#FFFFFF</color>
<color name="theme_6_md_theme_light_tertiaryContainer">#F1DAFF</color>
<color name="theme_6_md_theme_light_onTertiaryContainer">#241432</color>
<color name="theme_6_md_theme_light_error">#BA1A1A</color>
<color name="theme_6_md_theme_light_errorContainer">#FFDAD6</color>
<color name="theme_6_md_theme_light_onError">#FFFFFF</color>
<color name="theme_6_md_theme_light_onErrorContainer">#410002</color>
<color name="theme_6_md_theme_light_background">#FDFCFF</color>
<color name="theme_6_md_theme_light_onBackground">#1A1C1E</color>
<color name="theme_6_md_theme_light_surface">#FDFCFF</color>
<color name="theme_6_md_theme_light_onSurface">#1A1C1E</color>
<color name="theme_6_md_theme_light_surfaceVariant">#DFE3EB</color>
<color name="theme_6_md_theme_light_onSurfaceVariant">#42474E</color>
<color name="theme_6_md_theme_light_outline">#73777F</color>
<color name="theme_6_md_theme_light_inverseOnSurface">#F1F0F4</color>
<color name="theme_6_md_theme_light_inverseSurface">#2F3033</color>
<color name="theme_6_md_theme_light_inversePrimary">#9DCAFF</color>
<color name="theme_6_md_theme_light_shadow">#000000</color>
<color name="theme_6_md_theme_light_surfaceTint">#0062A1</color>
<color name="theme_6_md_theme_light_outlineVariant">#C2C7CF</color>
<color name="theme_6_md_theme_light_scrim">#000000</color>
<color name="theme_6_md_theme_dark_primary">#9DCAFF</color>
<color name="theme_6_md_theme_dark_onPrimary">#003257</color>
<color name="theme_6_md_theme_dark_primaryContainer">#00497B</color>
<color name="theme_6_md_theme_dark_onPrimaryContainer">#D0E4FF</color>
<color name="theme_6_md_theme_dark_secondary">#BAC8DB</color>
<color name="theme_6_md_theme_dark_onSecondary">#253140</color>
<color name="theme_6_md_theme_dark_secondaryContainer">#3B4857</color>
<color name="theme_6_md_theme_dark_onSecondaryContainer">#D6E4F7</color>
<color name="theme_6_md_theme_dark_tertiary">#D6BEE5</color>
<color name="theme_6_md_theme_dark_onTertiary">#3A2948</color>
<color name="theme_6_md_theme_dark_tertiaryContainer">#524060</color>
<color name="theme_6_md_theme_dark_onTertiaryContainer">#F1DAFF</color>
<color name="theme_6_md_theme_dark_error">#FFB4AB</color>
<color name="theme_6_md_theme_dark_errorContainer">#93000A</color>
<color name="theme_6_md_theme_dark_onError">#690005</color>
<color name="theme_6_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="theme_6_md_theme_dark_background">#1A1C1E</color>
<color name="theme_6_md_theme_dark_onBackground">#E2E2E6</color>
<color name="theme_6_md_theme_dark_surface">#1A1C1E</color>
<color name="theme_6_md_theme_dark_onSurface">#E2E2E6</color>
<color name="theme_6_md_theme_dark_surfaceVariant">#42474E</color>
<color name="theme_6_md_theme_dark_onSurfaceVariant">#C2C7CF</color>
<color name="theme_6_md_theme_dark_outline">#8C9199</color>
<color name="theme_6_md_theme_dark_inverseOnSurface">#1A1C1E</color>
<color name="theme_6_md_theme_dark_inverseSurface">#E2E2E6</color>
<color name="theme_6_md_theme_dark_inversePrimary">#0062A1</color>
<color name="theme_6_md_theme_dark_shadow">#000000</color>
<color name="theme_6_md_theme_dark_surfaceTint">#9DCAFF</color>
<color name="theme_6_md_theme_dark_outlineVariant">#42474E</color>
<color name="theme_6_md_theme_dark_scrim">#000000</color>

</resources>
37 changes: 37 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,41 @@
tools:targetApi="q">false</item>
</style>

<style
name="AppTheme6"
parent="Theme.Material3.Light.NoActionBar">
<item name="colorPrimary">@color/theme_6_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/theme_6_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/theme_6_md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/theme_6_md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/theme_6_md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/theme_6_md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/theme_6_md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/theme_6_md_theme_light_onSecondaryContainer</item>
<item name="colorTertiary">@color/theme_6_md_theme_light_tertiary</item>
<item name="colorOnTertiary">@color/theme_6_md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/theme_6_md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/theme_6_md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/theme_6_md_theme_light_error</item>
<item name="colorErrorContainer">@color/theme_6_md_theme_light_errorContainer</item>
<item name="colorOnError">@color/theme_6_md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/theme_6_md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/theme_6_md_theme_light_background</item>
<item name="colorOnBackground">@color/theme_6_md_theme_light_onBackground</item>
<item name="colorSurface">@color/theme_6_md_theme_light_surface</item>
<item name="colorOnSurface">@color/theme_6_md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/theme_6_md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/theme_6_md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/theme_6_md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/theme_6_md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/theme_6_md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/theme_6_md_theme_light_inversePrimary</item>

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

</resources>

0 comments on commit 46b6620

Please sign in to comment.