Skip to content

Commit 79a69dc

Browse files
committed
* Improved colors
* Toolbar has default background color
1 parent e1d4352 commit 79a69dc

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

app/src/main/java/com/codedead/deadhash/gui/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ private void loadTheme() {
184184
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
185185
break;
186186
case "1":
187-
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
187+
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
188188
break;
189189
case "2":
190-
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
190+
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
191191
break;
192192
}
193193
}

app/src/main/java/com/codedead/deadhash/gui/SettingsActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ protected void onCreate(final Bundle savedInstanceState) {
6161
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
6262
break;
6363
case "1":
64-
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
64+
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
6565
break;
6666
case "2":
67-
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
67+
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
6868
break;
6969
}
7070
}

app/src/main/res/layout/app_bar_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<com.google.android.material.appbar.AppBarLayout
1111
android:layout_width="match_parent"
1212
android:layout_height="wrap_content"
13-
android:theme="@style/Theme.DeadHash.AppBarOverlay">
13+
android:fitsSystemWindows="true"
14+
android:theme="@style/ThemeOverlay.MaterialComponents.Toolbar.Primary">
1415

1516
<androidx.appcompat.widget.Toolbar
1617
android:id="@+id/toolbar"
1718
android:layout_width="match_parent"
1819
android:layout_height="?attr/actionBarSize"
19-
android:background="?attr/colorPrimary"
2020
app:popupTheme="@style/Theme.DeadHash.PopupOverlay" />
2121

2222
</com.google.android.material.appbar.AppBarLayout>

app/src/main/res/layout/settings_activity.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<com.google.android.material.appbar.AppBarLayout
88
android:layout_width="match_parent"
99
android:layout_height="wrap_content"
10-
android:theme="@style/Theme.DeadHash.AppBarOverlay">
10+
android:fitsSystemWindows="true"
11+
android:theme="@style/ThemeOverlay.MaterialComponents.Toolbar.Primary">
1112

1213
<androidx.appcompat.widget.Toolbar
1314
android:id="@+id/toolbar_settings"
1415
android:layout_width="match_parent"
1516
android:layout_height="?attr/actionBarSize"
16-
android:background="?attr/colorPrimary"
1717
app:popupTheme="@style/Theme.DeadHash.PopupOverlay" />
1818

1919
</com.google.android.material.appbar.AppBarLayout>

app/src/main/res/values-night/themes.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<!-- Base application theme. -->
33
<style name="Theme.DeadHash" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
44
<!-- Primary brand color. -->
5-
<item name="colorPrimary">@color/purple_500</item>
6-
<item name="colorPrimaryVariant">@color/purple_700</item>
5+
<item name="colorPrimary">@color/purple_200</item>
6+
<item name="colorPrimaryVariant">@color/purple_500</item>
77
<item name="colorOnPrimary">@color/black</item>
88
<!-- Secondary brand color. -->
99
<item name="colorSecondary">@color/teal_200</item>

app/src/main/res/values/colors.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3+
<color name="purple_200">#FF0400ba</color>
34
<color name="purple_500">#FF6200EE</color>
45
<color name="purple_700">#FF3700B3</color>
5-
<color name="teal_200">#FF03DAC5</color>
6-
<color name="teal_700">#FF018786</color>
6+
<color name="teal_200">#03DAC6</color>
7+
<color name="teal_700">#018786</color>
78
<color name="black">#FF000000</color>
89
<color name="white">#FFFFFFFF</color>
910
<color name="red">#FF0000</color>

0 commit comments

Comments
 (0)