Added grey theme

pull/162/head
M66B 5 years ago
parent 79e4ed0903
commit 0a3c6832cf

@ -56,8 +56,8 @@ For authorizing:
* ~~Compose lists and tables~~ (this requires a rich text editor, see [this FAQ](#user-content-faq99))
* ~~Pinch zoom text size~~
* ~~Display GIFs~~
* ~~Themes~~ (a grey theme was added because this is what most people seems to want)
* Send as attachment
* Themes
* Search for settings
* Select any day for time conditions
* Widget for selected account

@ -78,6 +78,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
setTheme(R.style.AppThemeDark);
else if ("black".equals(theme))
setTheme(R.style.AppThemeBlack);
else if ("grey".equals(theme))
setTheme(R.style.AppThemeGrey);
else if ("system".equals(theme)) {
int uiMode = getResources().getConfiguration().uiMode;
Log.i("UI mode=" + uiMode);

@ -392,6 +392,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
case "black":
rgTheme.check(R.id.rbThemeBlack);
break;
case "grey":
rgTheme.check(R.id.rbThemeGrey);
break;
case "system":
rgTheme.check(R.id.rbThemeSystem);
break;
@ -414,6 +417,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
case R.id.rbThemeBlack:
prefs.edit().putString("theme", "black").apply();
break;
case R.id.rbThemeGrey:
prefs.edit().putString("theme", "grey").apply();
break;
case R.id.rbThemeSystem:
prefs.edit().putString("theme", "system").apply();
break;

@ -39,6 +39,15 @@
android:text="@string/title_setup_black_theme"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
android:id="@+id/rbThemeGrey"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:padding="6dp"
android:text="@string/title_setup_grey_theme"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<RadioButton
android:id="@+id/rbThemeSystem"
android:layout_width="match_parent"

@ -1,27 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- https://material-ui.com/customization/color/#color-palette -->
<!-- https://material.io/resources/color/ -->
<!-- shade 600 -->
<!-- Light blue 600 / Amber 600 -->
<color name="colorPrimary">#039be5</color>
<color name="colorPrimaryDark">#026ca0</color>
<color name="colorPrimaryDark">#006db3</color>
<color name="colorAccent">#ffb300</color>
<color name="colorPrimaryLight">#35afea</color>
<color name="colorAccentLight">#ffc233</color>
<color name="colorAccentDark">#b27d00</color>
<color name="colorAccentDark">#c68400</color>
<color name="colorError">#ff0000</color>
<!-- shade 900 -->
<!-- Light blue 900 -->
<color name="blackPrimary">#01579b</color>
<color name="blackPrimaryDark">#003c6c</color>
<color name="blackPrimaryDark">#002f6c</color>
<!-- Grey 800 / Blue grey 300 -->
<color name="greyPrimary">#424242</color>
<color name="greyPrimaryDark">#1b1b1b</color>
<color name="greyAccent">#90a4ae</color>
<color name="colorActionForeground">#fff</color>
<color name="colorActionForegroundDisabled">#ccc</color>
<color name="colorToastForeground">#fff</color>
<color name="colorToastBackground">#026ca0</color>
<color name="colorToastBackground">#006db3</color>
<color name="colorWidgetForeground">#fff</color>
<color name="colorWidgetBackground">#7f000000</color>

@ -182,6 +182,7 @@
<string name="title_setup_light_theme">Light theme</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_black_theme">Black theme</string>
<string name="title_setup_grey_theme">Grey theme</string>
<string name="title_setup_system_theme">System theme</string>
<string name="title_setup_advanced">Advanced</string>

@ -73,6 +73,18 @@
<item name="colorDrawerBackground">@android:color/black</item>
</style>
<style name="AppThemeGrey" parent="AppThemeDark">
<item name="themeName">black</item>
<item name="colorPrimary">@color/greyPrimary</item>
<item name="colorPrimaryDark">@color/greyPrimaryDark</item>
<item name="colorAccent">@color/greyAccent</item>
<item name="colorUnread">@color/greyAccent</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="colorDrawerBackground">@android:color/black</item>
</style>
<style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat.NoActionBar">
<item name="android:background">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>

Loading…
Cancel
Save