Kotlin code refactor
parent
ffa3125438
commit
10503c183a
|
@ -92,9 +92,6 @@ class AlbumCoverStylePreferenceDialog : DialogFragment(),
|
||||||
PreferenceUtilKT.albumCoverStyle = coverStyle
|
PreferenceUtilKT.albumCoverStyle = coverStyle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.setNegativeButton(android.R.string.cancel) { _, _ ->
|
|
||||||
dismiss()
|
|
||||||
}
|
|
||||||
.setView(view)
|
.setView(view)
|
||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,10 @@ class NowPlayingScreenPreferenceDialog : DialogFragment(), ViewPager.OnPageChang
|
||||||
viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
|
viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
|
||||||
viewPager.currentItem = PreferenceUtilKT.nowPlayingScreen.ordinal
|
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)
|
.setTitle(R.string.pref_title_now_playing_screen_appearance)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton(R.string.set) { _, _ ->
|
.setPositiveButton(R.string.set) { _, _ ->
|
||||||
|
|
Loading…
Reference in New Issue