From 5dc7b52fc3606b24df0ed1da8d73b0f038bb90a0 Mon Sep 17 00:00:00 2001 From: OxygenCobalt Date: Fri, 11 Jun 2021 13:54:54 -0600 Subject: [PATCH] style: add dialog black theme support Make dialogs properly follow the black theme. This should complete the black theme addition as now all parts of Auxio follow the new theme. --- README.md | 17 +++++----- .../auxio/settings/ui/LifecycleDialog.kt | 4 ++- app/src/main/res/layout/dialog_blacklist.xml | 4 +-- .../main/res/layout/item_blacklist_entry.xml | 1 + app/src/main/res/values/styles_android.xml | 34 +++++++++++++------ app/src/main/res/values/styles_core.xml | 1 + 6 files changed, 37 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index abb8ee9bd..8a19cbe90 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,14 @@ I primarily built Auxio for myself, but you can use it too, I guess. ## Screenshots

- - - - - - - - + + + + + + + +

## Features @@ -51,7 +51,6 @@ I primarily built Auxio for myself, but you can use it too, I guess. ## To possibly come in the future: - Artist Images -- Black theme - Custom accents - Playlists - Liked songs diff --git a/app/src/main/java/org/oxycblt/auxio/settings/ui/LifecycleDialog.kt b/app/src/main/java/org/oxycblt/auxio/settings/ui/LifecycleDialog.kt index dd9b64c34..eb3a9416f 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/ui/LifecycleDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/ui/LifecycleDialog.kt @@ -5,9 +5,11 @@ import android.os.Bundle import android.view.View import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatDialogFragment +import androidx.core.graphics.drawable.toDrawable import androidx.fragment.app.DialogFragment import com.google.android.material.dialog.MaterialAlertDialogBuilder import org.oxycblt.auxio.R +import org.oxycblt.auxio.ui.resolveAttr import org.oxycblt.auxio.ui.toDrawable /** @@ -20,7 +22,7 @@ abstract class LifecycleDialog : AppCompatDialogFragment() { // Setting the background in XML will also apply it to the tooltip for some inane reason // so we have to do it programmatically instead. - builder.background = R.color.surface_color.toDrawable(requireContext()) + builder.background = R.attr.colorSurface.resolveAttr(requireContext()).toDrawable() onConfigDialog(builder) diff --git a/app/src/main/res/layout/dialog_blacklist.xml b/app/src/main/res/layout/dialog_blacklist.xml index afeba3541..1614ebbcd 100644 --- a/app/src/main/res/layout/dialog_blacklist.xml +++ b/app/src/main/res/layout/dialog_blacklist.xml @@ -6,10 +6,8 @@ + android:paddingTop="@dimen/spacing_small"> 0dp - - + + + - - - - + + + + + + + @@ -64,7 +78,7 @@ wrap_content @font/inter_semibold ?android:attr/textAppearanceButton - @color/selection_color + ?android:attr/colorControlHighlight 0dp @@ -72,6 +86,4 @@ - - \ No newline at end of file diff --git a/app/src/main/res/values/styles_core.xml b/app/src/main/res/values/styles_core.xml index b9db5b514..5484ea2ef 100644 --- a/app/src/main/res/values/styles_core.xml +++ b/app/src/main/res/values/styles_core.xml @@ -45,5 +45,6 @@ @color/surface_color_black @color/selection_color_black @style/ThemeOverlay.ToolbarPopup.Black + @style/Theme.CustomDialog.Black \ No newline at end of file