Added reverse themes

pull/171/head
M66B 5 years ago
parent 6e91df64e6
commit 85b4554317

@ -91,30 +91,52 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
case "blue_orange_light":
setTheme(R.style.AppThemeBlueOrangeLight);
break;
case "orange_blue_light":
setTheme(R.style.AppThemeOrangeBlueLight);
break;
case "yellow_purple_light":
setTheme(R.style.AppThemeYellowPurpleLight);
break;
case "purple_yellow_light":
setTheme(R.style.AppThemePurpleYellowLight);
break;
case "red_green_light":
setTheme(R.style.AppThemeRedGreenLight);
break;
case "grey_light":
setTheme(R.style.AppThemeGreySteelBlueLight);
case "green_red_light":
setTheme(R.style.AppThemeGreenRedLight);
break;
case "dark":
case "blue_orange_dark":
setTheme(R.style.AppThemeBlueOrangeDark);
break;
case "orange_blue_dark":
setTheme(R.style.AppThemeOrangeBlueDark);
break;
case "yellow_purple_dark":
setTheme(R.style.AppThemeYellowPurpleDark);
break;
case "purple_yellow_dark":
setTheme(R.style.AppThemePurpleYellowDark);
break;
case "red_green_dark":
setTheme(R.style.AppThemeRedGreenDark);
break;
case "green_red_dark":
setTheme(R.style.AppThemeGreenRedDark);
break;
case "grey_light":
setTheme(R.style.AppThemeGreySteelBlueLight);
break;
case "grey_dark":
setTheme(R.style.AppThemeGreySteelBlueDark);
break;
case "black":
setTheme(R.style.AppThemeBlack);
break;

@ -670,6 +670,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
String theme = prefs.getString("theme", "light");
swReverse.setChecked(theme.startsWith("orange_blue") ||
theme.startsWith("purple_yellow") ||
theme.startsWith("green_red"));
swDark.setChecked(theme.endsWith("dark"));
swSystem.setChecked(theme.endsWith("system"));
@ -694,14 +697,20 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
case "system":
case "blue_orange_light":
case "blue_orange_dark":
case "orange_blue_light":
case "orange_blue_dark":
rgTheme.check(R.id.rbThemeBlueOrange);
break;
case "yellow_purple_light":
case "yellow_purple_dark":
case "purple_yellow_light":
case "purple_yellow_dark":
rgTheme.check(R.id.rbThemeYellowPurple);
break;
case "red_green_light":
case "red_green_dark":
case "green_red_light":
case "green_red_dark":
rgTheme.check(R.id.rbThemeRedGreen);
break;
case "grey_system":
@ -727,22 +736,20 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
case R.id.rbThemeBlueOrange:
if (swSystem.isChecked())
prefs.edit().putString("theme", "system").apply();
else if (swDark.isChecked())
prefs.edit().putString("theme", "blue_orange_dark").apply();
else
prefs.edit().putString("theme", "blue_orange_light").apply();
prefs.edit().putString("theme",
(swReverse.isChecked() ? "orange_blue" : "blue_orange") +
(swDark.isChecked() ? "_dark" : "_light")).apply();
break;
case R.id.rbThemeYellowPurple:
if (swDark.isChecked())
prefs.edit().putString("theme", "yellow_purple_dark").apply();
else
prefs.edit().putString("theme", "yellow_purple_light").apply();
prefs.edit().putString("theme",
(swReverse.isChecked() ? "purple_yellow" : "yellow_purple") +
(swDark.isChecked() ? "_dark" : "_light")).apply();
break;
case R.id.rbThemeRedGreen:
if (swDark.isChecked())
prefs.edit().putString("theme", "red_green_dark").apply();
else
prefs.edit().putString("theme", "red_green_light").apply();
prefs.edit().putString("theme",
(swReverse.isChecked() ? "green_red" : "red_green") +
(swDark.isChecked() ? "_dark" : "_light")).apply();
break;
case R.id.rbThemeGrey:
if (swSystem.isChecked())

@ -33,7 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/title_setup_theme_blue_amber"
android:text="@string/title_setup_theme_blue_orange"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
@ -75,7 +75,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_setup_theme_reverse"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rgTheme" />

@ -13,17 +13,6 @@
<color name="colorEncryptLight">#ff00ff00</color>
<color name="colorEncryptDark">#ff00e000</color>
<!-- Grey 800 -->
<color name="darkPrimary">#424242</color>
<color name="darkPrimaryDark">#1b1b1b</color>
<color name="darkPrimaryLight">#6d6d6d</color>
<!-- Grey 800 / Blue grey 300 -->
<color name="greyPrimary">#424242</color>
<color name="greyPrimaryDark">#1b1b1b</color>
<color name="greyAccent">#90a4ae</color>
<color name="greyAccentDark">#62757f</color>
<color name="colorWidgetForeground">#fff</color>
<color name="colorWidgetBackground">#7f000000</color>
<color name="colorWidgetRead">#ddd</color>
@ -63,30 +52,71 @@
<color name="lightAmberAccent">#ffb300</color>
<color name="lightAmberAccentDark">#c68400</color>
<!-- Light blue 900 -->
<color name="darkBluePrimary">#01579b</color>
<color name="darkBluePrimaryDark">#002f6c</color>
<!-- Amber 600 / Light blue 600 -->
<color name="lightAmberPrimary">#ffb300</color>
<color name="lightAmberPrimaryDark">#c68400</color>
<color name="lightBlueAccent">#039be5</color>
<!-- Yellow 600 / Purple 800 -->
<!-- Yellow 600 / Purple 600 -->
<color name="lightYellowPrimary">#fdd835</color>
<color name="lightYellowPrimaryDark">#c6a700</color>
<color name="lightPurpleAccent">#8e24aa</color>
<!-- Yellow 900 / Purple 300 -->
<color name="darkYellowPrimary">#f57f17</color>
<color name="darkYellowPrimaryDark">#bc5100</color>
<color name="darkPurpleAccent">#ba68c8</color>
<!-- Purple 600 / Yellow 800 -->
<color name="lightPurplePrimary">#8e24aa</color>
<color name="lightPurplePrimaryDark">#5c007a</color>
<color name="lightYellowAccent">#f9a825</color>
<!-- Red 600 / Green 600 -->
<color name="lightRedPrimary">#e53935</color>
<color name="lightRedPrimaryDark">#ab000d</color>
<color name="lightGreenAccent">#43a047</color>
<!-- Green 600 / Red 600 -->
<color name="lightGreenPrimary">#43a047</color>
<color name="lightGreenPrimaryDark">#00701a</color>
<color name="lightRedAccent">#e53935</color>
<!-- Light blue 900 -->
<color name="darkBluePrimary">#01579b</color>
<color name="darkBluePrimaryDark">#002f6c</color>
<color name="darkAmberAccent">#ffb300</color>
<!-- Amber 900 / Light blue 300-->
<color name="darkAmberPrimary">#ff6f00</color>
<color name="darkAmberPrimaryDark">#c43e00</color>
<color name="darkBlueAccent">#4fc3f7</color>
<!-- Yellow 900 / Purple 300 -->
<color name="darkYellowPrimary">#f57f17</color>
<color name="darkYellowPrimaryDark">#bc5100</color>
<color name="darkPurpleAccent">#ba68c8</color>
<!-- Purple 900 / Yellow 300 -->
<color name="darkPurplePrimary">#4a148c</color>
<color name="darkPurplePrimaryDark">#12005e</color>
<color name="darkYellowAccent">#fff176</color>
<!-- Red 900 / Green 300 -->
<color name="darkRedPrimary">#b71c1c</color>
<color name="darkRedPrimaryDark">#7f0000</color>
<color name="darkGreenAccent">#81c784</color>
<!-- Green 900 / Red 300 -->
<color name="darkGreenPrimary">#1b5e20</color>
<color name="darkGreenPrimaryDark">#003300</color>
<color name="darkRedAccent">#e57373</color>
<!-- Grey 800 -->
<color name="blackPrimary">#424242</color>
<color name="blackPrimaryDark">#1b1b1b</color>
<!-- Grey 800 / Blue grey 300 -->
<color name="greyPrimary">#424242</color>
<color name="greyPrimaryDark">#1b1b1b</color>
<color name="greyAccent">#90a4ae</color>
<color name="greyAccentDark">#62757f</color>
<!-- default: #323232 -->
<color name="design_snackbar_background_color" tools:override="true">#222</color>

@ -201,7 +201,7 @@
<string name="title_setup_theme">Select theme</string>
<string name="title_setup_theme_blue_amber">Blue/orange</string>
<string name="title_setup_theme_blue_orange">Blue/orange</string>
<string name="title_setup_theme_yellow_purple">Yellow/purple</string>
<string name="title_setup_theme_red_green">Red/green</string>
<string name="title_setup_theme_grey">Grey</string>

@ -97,6 +97,8 @@
<item name="android:scrollbarTrackVertical">@drawable/scroll_track</item>
</style>
<!-- Light -->
<style name="AppThemeBlueOrangeLight" parent="AppThemeBaseLight">
<item name="colorPrimary">@color/lightBluePrimary</item>
<item name="colorPrimaryDark">@color/lightBluePrimaryDark</item>
@ -108,12 +110,29 @@
<item name="colorFabBackground">@color/lightAmberAccent</item>
<item name="colorInfoForeground">@color/black</item>
<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoBackground">@color/lightAmberAccent</item>
<item name="android:textColorLink">@color/lightAmberAccentDark</item>
</style>
<style name="AppThemeOrangeBlueLight" parent="AppThemeBaseLight">
<item name="colorPrimary">@color/lightAmberPrimary</item>
<item name="colorPrimaryDark">@color/lightAmberPrimaryDark</item>
<item name="colorAccent">@color/lightBlueAccent</item>
<item name="colorUnreadHighlight">@color/lightBlueAccent</item>
<item name="colorWarning">@color/lightBlueAccent</item>
<item name="colorFabBackground">@color/lightBlueAccent</item>
<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoBackground">@color/lightBlueAccent</item>
<item name="android:textColorLink">@color/lightBlueAccent</item>
</style>
<style name="AppThemeYellowPurpleLight" parent="AppThemeBaseLight">
<item name="colorPrimary">@color/lightYellowPrimary</item>
<item name="colorPrimaryDark">@color/lightYellowPrimaryDark</item>
@ -129,6 +148,21 @@
<item name="android:textColorLink">@color/lightPurpleAccent</item>
</style>
<style name="AppThemePurpleYellowLight" parent="AppThemeBaseLight">
<item name="colorPrimary">@color/lightPurplePrimary</item>
<item name="colorPrimaryDark">@color/lightPurplePrimaryDark</item>
<item name="colorAccent">@color/lightYellowAccent</item>
<item name="colorUnreadHighlight">@color/lightYellowAccent</item>
<item name="colorFabBackground">@color/lightYellowAccent</item>
<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoBackground">@color/lightYellowAccent</item>
<item name="android:textColorLink">@color/lightYellowAccent</item>
</style>
<style name="AppThemeRedGreenLight" parent="AppThemeBaseLight">
<item name="colorPrimary">@color/lightRedPrimary</item>
<item name="colorPrimaryDark">@color/lightRedPrimaryDark</item>
@ -144,19 +178,51 @@
<item name="android:textColorLink">@color/lightGreenAccent</item>
</style>
<style name="AppThemeGreenRedLight" parent="AppThemeBaseLight">
<item name="colorPrimary">@color/lightGreenPrimary</item>
<item name="colorPrimaryDark">@color/lightGreenPrimaryDark</item>
<item name="colorAccent">@color/lightRedAccent</item>
<item name="colorUnreadHighlight">@color/lightRedAccent</item>
<item name="colorFabBackground">@color/lightRedAccent</item>
<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoBackground">@color/lightRedAccent</item>
<item name="android:textColorLink">@color/lightRedAccent</item>
</style>
<!-- Dark -->
<style name="AppThemeBlueOrangeDark" parent="AppThemeBaseDark">
<item name="colorPrimary">@color/darkBluePrimary</item>
<item name="colorPrimaryDark">@color/darkBluePrimaryDark</item>
<item name="colorAccent">@color/lightAmberAccent</item>
<item name="colorAccent">@color/darkAmberAccent</item>
<item name="colorUnreadHighlight">@color/lightAmberAccent</item>
<item name="colorUnreadHighlight">@color/darkAmberAccent</item>
<item name="colorWarning">@color/lightAmberAccent</item>
<item name="colorWarning">@color/darkAmberAccent</item>
<item name="colorFabBackground">@color/lightAmberAccent</item>
<item name="colorFabBackground">@color/darkAmberAccent</item>
<item name="colorInfoForeground">@color/black</item>
<item name="colorInfoBackground">@color/lightAmberAccent</item>
<item name="colorInfoBackground">@color/darkAmberAccent</item>
</style>
<style name="AppThemeOrangeBlueDark" parent="AppThemeBaseDark">
<item name="colorPrimary">@color/darkAmberPrimary</item>
<item name="colorPrimaryDark">@color/darkAmberPrimaryDark</item>
<item name="colorAccent">@color/darkBlueAccent</item>
<item name="colorUnreadHighlight">@color/darkBlueAccent</item>
<item name="colorWarning">@color/darkBlueAccent</item>
<item name="colorFabBackground">@color/darkBlueAccent</item>
<item name="colorInfoForeground">@color/black</item>
<item name="colorInfoBackground">@color/darkBlueAccent</item>
</style>
<style name="AppThemeYellowPurpleDark" parent="AppThemeBaseDark">
@ -168,12 +234,27 @@
<item name="colorFabBackground">@color/darkPurpleAccent</item>
<item name="colorInfoForeground">@color/white</item>
<item name="colorInfoForeground">@color/black</item>
<item name="colorInfoBackground">@color/darkPurpleAccent</item>
<item name="android:textColorLink">@color/darkPurpleAccent</item>
</style>
<style name="AppThemePurpleYellowDark" parent="AppThemeBaseDark">
<item name="colorPrimary">@color/darkPurplePrimary</item>
<item name="colorPrimaryDark">@color/darkPurplePrimaryDark</item>
<item name="colorAccent">@color/darkYellowAccent</item>
<item name="colorUnreadHighlight">@color/darkYellowAccent</item>
<item name="colorFabBackground">@color/darkYellowAccent</item>
<item name="colorInfoForeground">@color/black</item>
<item name="colorInfoBackground">@color/darkYellowAccent</item>
<item name="android:textColorLink">@color/darkYellowAccent</item>
</style>
<style name="AppThemeRedGreenDark" parent="AppThemeBaseDark">
<item name="colorPrimary">@color/darkRedPrimary</item>
<item name="colorPrimaryDark">@color/darkRedPrimaryDark</item>
@ -189,10 +270,27 @@
<item name="android:textColorLink">@color/darkGreenAccent</item>
</style>
<style name="AppThemeGreenRedDark" parent="AppThemeBaseDark">
<item name="colorPrimary">@color/darkGreenPrimary</item>
<item name="colorPrimaryDark">@color/darkGreenPrimaryDark</item>
<item name="colorAccent">@color/darkRedAccent</item>
<item name="colorUnreadHighlight">@color/darkRedAccent</item>
<item name="colorFabBackground">@color/darkRedAccent</item>
<item name="colorInfoForeground">@color/black</item>
<item name="colorInfoBackground">@color/darkRedAccent</item>
<item name="android:textColorLink">@color/darkRedAccent</item>
</style>
<!-- Other -->
<style name="AppThemeBlack" parent="AppThemeBlueOrangeDark">
<item name="themeName">black</item>
<item name="colorPrimary">@color/darkPrimary</item>
<item name="colorPrimaryDark">@color/darkPrimaryDark</item>
<item name="colorPrimary">@color/blackPrimary</item>
<item name="colorPrimaryDark">@color/blackPrimaryDark</item>
<item name="android:windowBackground">@color/black</item>
<item name="colorDrawerBackground">@color/black</item>

Loading…
Cancel
Save