From 10503c183ac27129ddb321deefc68f9d7036fade Mon Sep 17 00:00:00 2001 From: Hemanth S Date: Sun, 24 May 2020 04:26:11 +0530 Subject: [PATCH] Kotlin code refactor --- .../preferences/AlbumCoverStylePreferenceDialog.kt | 3 --- .../preferences/NowPlayingScreenPreferenceDialog.kt | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt index e5b1af56..ec8e6d36 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt @@ -92,9 +92,6 @@ class AlbumCoverStylePreferenceDialog : DialogFragment(), PreferenceUtilKT.albumCoverStyle = coverStyle } } - .setNegativeButton(android.R.string.cancel) { _, _ -> - dismiss() - } .setView(view) .create() } diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt index aaf000c2..c6049401 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt @@ -86,7 +86,10 @@ class NowPlayingScreenPreferenceDialog : DialogFragment(), ViewPager.OnPageChang viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt() viewPager.currentItem = PreferenceUtilKT.nowPlayingScreen.ordinal - return MaterialAlertDialogBuilder(requireContext()) + return MaterialAlertDialogBuilder( + requireContext(), + R.style.ThemeOverlay_MaterialComponents_Dialog_Alert + ) .setTitle(R.string.pref_title_now_playing_screen_appearance) .setCancelable(false) .setPositiveButton(R.string.set) { _, _ ->