diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt index 6d4474d9..97b93c2e 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt @@ -15,6 +15,7 @@ package code.name.monkey.retromusic.activities.base import android.animation.Animator +import android.content.res.ColorStateList import android.graphics.Color import android.os.Bundle import android.view.View @@ -60,6 +61,7 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.model.CategoryInfo import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.RetroUtil +import com.google.android.material.bottomnavigation.BottomNavigationView import com.google.android.material.bottomsheet.BottomSheetBehavior.* import org.koin.androidx.viewmodel.ext.android.viewModel @@ -133,6 +135,8 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity() { setupSlidingUpPanel() setupBottomSheet() updateColor() + binding.slidingPanel.backgroundTintList = ColorStateList.valueOf(darkAccentColor()) + bottomNavigationView.backgroundTintList = ColorStateList.valueOf(darkAccentColor()) } private fun setupBottomSheet() { diff --git a/app/src/main/java/code/name/monkey/retromusic/extensions/ColorExtensions.kt b/app/src/main/java/code/name/monkey/retromusic/extensions/ColorExtensions.kt index cbeecfeb..89344981 100644 --- a/app/src/main/java/code/name/monkey/retromusic/extensions/ColorExtensions.kt +++ b/app/src/main/java/code/name/monkey/retromusic/extensions/ColorExtensions.kt @@ -29,6 +29,7 @@ import androidx.annotation.ColorRes import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.Toolbar import androidx.core.content.ContextCompat +import androidx.core.graphics.ColorUtils import androidx.core.graphics.drawable.DrawableCompat import androidx.fragment.app.Fragment import code.name.monkey.appthemehelper.ThemeStore @@ -223,3 +224,8 @@ fun Drawable.tint(context: Context, @ColorRes color: Int): Drawable = fun Context.getColorCompat(@ColorRes colorRes: Int): Int { return ContextCompat.getColor(this, colorRes) } + +@ColorInt +fun Context.darkAccentColor(): Int { + return ColorUtils.blendARGB(accentColor(), surfaceColor(), 0.975f) +}