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.
This commit is contained in:
OxygenCobalt
2021-06-11 13:54:54 -06:00
parent 381c0f0944
commit 5dc7b52fc3
6 changed files with 37 additions and 24 deletions
@@ -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)