From f63fdf26c92a63ae9de88875c7270a9973a700b3 Mon Sep 17 00:00:00 2001 From: lynxnb Date: Fri, 21 Jan 2022 18:58:16 +0100 Subject: [PATCH] Partially revert 'Make all `Dialog`s use `@color/backgroundColor` as the background color' This partially reverts commit 36a1f2a2ec792ecfc7ac9281e34423544111ddf0. --- app/src/main/java/emu/skyline/AppDialog.kt | 1 - app/src/main/java/emu/skyline/input/dialog/ButtonDialog.kt | 1 - app/src/main/java/emu/skyline/input/dialog/RumbleDialog.kt | 1 - app/src/main/java/emu/skyline/input/dialog/StickDialog.kt | 1 - app/src/main/java/emu/skyline/preference/LicenseDialog.kt | 2 -- 5 files changed, 6 deletions(-) diff --git a/app/src/main/java/emu/skyline/AppDialog.kt b/app/src/main/java/emu/skyline/AppDialog.kt index d1e38bf4..49585726 100644 --- a/app/src/main/java/emu/skyline/AppDialog.kt +++ b/app/src/main/java/emu/skyline/AppDialog.kt @@ -70,7 +70,6 @@ class AppDialog : BottomSheetDialogFragment() { override fun onViewCreated(view : View, savedInstanceState : Bundle?) { super.onViewCreated(view, savedInstanceState) - view.setBackgroundColor(requireContext().getColor(R.color.backgroundColor)) val missingIcon = ContextCompat.getDrawable(requireActivity(), R.drawable.default_icon)!!.toBitmap(256, 256) diff --git a/app/src/main/java/emu/skyline/input/dialog/ButtonDialog.kt b/app/src/main/java/emu/skyline/input/dialog/ButtonDialog.kt index 04c2e1c6..1b2bea87 100644 --- a/app/src/main/java/emu/skyline/input/dialog/ButtonDialog.kt +++ b/app/src/main/java/emu/skyline/input/dialog/ButtonDialog.kt @@ -64,7 +64,6 @@ class ButtonDialog @JvmOverloads constructor(private val item : ControllerButton override fun onViewCreated(view : View, savedInstanceState : Bundle?) { super.onViewCreated(view, savedInstanceState) - view.setBackgroundColor(requireContext().getColor(R.color.backgroundColor)) if (item != null && context is ControllerActivity) { val context = requireContext() as ControllerActivity diff --git a/app/src/main/java/emu/skyline/input/dialog/RumbleDialog.kt b/app/src/main/java/emu/skyline/input/dialog/RumbleDialog.kt index 4f6b3ed2..96ddef16 100644 --- a/app/src/main/java/emu/skyline/input/dialog/RumbleDialog.kt +++ b/app/src/main/java/emu/skyline/input/dialog/RumbleDialog.kt @@ -47,7 +47,6 @@ class RumbleDialog @JvmOverloads constructor(val item : ControllerGeneralViewIte override fun onViewCreated(view : View, savedInstanceState : Bundle?) { super.onViewCreated(view, savedInstanceState) - view.setBackgroundColor(requireContext().getColor(R.color.backgroundColor)) if (item != null && context is ControllerActivity) { val context = requireContext() as ControllerActivity diff --git a/app/src/main/java/emu/skyline/input/dialog/StickDialog.kt b/app/src/main/java/emu/skyline/input/dialog/StickDialog.kt index 0651cb2f..72812e3a 100644 --- a/app/src/main/java/emu/skyline/input/dialog/StickDialog.kt +++ b/app/src/main/java/emu/skyline/input/dialog/StickDialog.kt @@ -240,7 +240,6 @@ class StickDialog @JvmOverloads constructor(val item : ControllerStickViewItem? override fun onViewCreated(view : View, savedInstanceState : Bundle?) { super.onViewCreated(view, savedInstanceState) - view.setBackgroundColor(requireContext().getColor(R.color.backgroundColor)) if (item != null && context is ControllerActivity) { val context = requireContext() as ControllerActivity diff --git a/app/src/main/java/emu/skyline/preference/LicenseDialog.kt b/app/src/main/java/emu/skyline/preference/LicenseDialog.kt index 4f69ace2..8b620f1d 100644 --- a/app/src/main/java/emu/skyline/preference/LicenseDialog.kt +++ b/app/src/main/java/emu/skyline/preference/LicenseDialog.kt @@ -9,7 +9,6 @@ import android.graphics.Rect import android.os.Bundle import android.view.* import com.google.android.material.bottomsheet.BottomSheetDialogFragment -import emu.skyline.R import emu.skyline.databinding.LicenseDialogBinding /** @@ -35,7 +34,6 @@ class LicenseDialog : BottomSheetDialogFragment() { override fun onViewCreated(view : View, savedInstanceState : Bundle?) { super.onViewCreated(view, savedInstanceState) - view.setBackgroundColor(requireContext().getColor(R.color.backgroundColor)) binding.libraryTitle.text = requireArguments().getString(LicensePreference.LIBRARY_TITLE_ARG) binding.libraryUrl.text = requireArguments().getString(LicensePreference.LIBRARY_URL_ARG)