Skip to content

Commit

Permalink
Use DayNight as the default theme
Browse files Browse the repository at this point in the history
This reduces the chance that we flashbang the user when they launch the
app. The issue remains on older Android versions that don't natively
support dark mode, but I don't think that's fixable.

Activities override the theme based on the user's settings, so this
change only has effect while the app is launching.
  • Loading branch information
alexbakker committed Mar 25, 2024
1 parent f44fe38 commit c39f834
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
android:icon="@mipmap/${iconName}"
android:label="Aegis"
android:supportsRtl="true"
android:theme="@style/Theme.Aegis.Launch"
tools:targetApi="tiramisu">
<activity android:name=".ui.TransferEntriesActivity"
android:label="@string/title_activity_transfer" />
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<resources>
<style name="Theme.Aegis.Launch" parent="Theme.Material3.DayNight.NoActionBar">
<!-- colorPrimary in the root theme sets the task description color (seen in task switcher) -->
<item name="colorPrimary">?attr/colorPrimary</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>

<style name="Base.Theme.Aegis.Light" parent="Theme.Material3.Light">
<!-- Material colors -->
<item name="colorPrimary">@color/md_theme_light_primary</item>
Expand Down

0 comments on commit c39f834

Please sign in to comment.