Skip to content

Commit

Permalink
Merge pull request #13 from shadow578/feature/material-you
Browse files Browse the repository at this point in the history
feature: Material3 / Material You
  • Loading branch information
shadow578 authored Oct 1, 2022
2 parents dd927c2 + e9d1277 commit b2b60bb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions app/src/main/kotlin/io/github/shadow578/yodel/YodelApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package io.github.shadow578.yodel

import android.app.Application
import androidx.preference.PreferenceManager
import com.google.android.material.color.DynamicColors
import io.github.shadow578.yodel.db.TracksDB
import io.github.shadow578.yodel.util.*
import io.github.shadow578.yodel.util.preferences.PreferenceWrapper
Expand All @@ -18,6 +19,9 @@ class YodelApp : Application() {
if (BuildConfig.DEBUG)
Timber.plant(Timber.DebugTree())

// apply material3 dynamic colors
DynamicColors.applyToActivitiesIfAvailable(this)

// initialize stuff
PreferenceWrapper.init(PreferenceManager.getDefaultSharedPreferences(this))
NotificationChannels.registerAll(this)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
1 change: 1 addition & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
6 changes: 3 additions & 3 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.Yodel" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<resources>
<style name="Theme.Yodel" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
Expand All @@ -15,7 +15,7 @@
<item name="colorOnError">#ffffff</item>

<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>

<!-- splash screen -->
<item name="splashIconColor">@color/white</item>
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.Yodel" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<resources>
<style name="Theme.Yodel" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Primary brand color -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
Expand All @@ -15,7 +15,7 @@
<item name="colorOnError">#FFFFFF</item>

<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>

<!-- splash screen -->
<item name="splashIconColor">@color/black</item>
Expand Down

0 comments on commit b2b60bb

Please sign in to comment.