Skip to content

Commit

Permalink
Support dark mode. (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
DDoSolitary committed Aug 2, 2020
1 parent dabf5f1 commit e0ac50a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@android:style/Theme.DeviceDefault.Light"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<receiver
android:name=".SshProxyReceiver"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#008577</color>
<color name="primary_dark">#00574B</color>
</resources>
13 changes: 7 additions & 6 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">#008577</item>
<item name="colorPrimaryDark">#00574B</item>
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
</style>

<style name="AppTheme.Dialog" parent="Theme.MaterialComponents.Light.Dialog" />
<style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />
</resources>

0 comments on commit e0ac50a

Please sign in to comment.