mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-21 01:25:19 +01:00
Code Cleanup
This commit is contained in:
parent
c8ce98b1df
commit
ea4a54d404
10 changed files with 23 additions and 24 deletions
|
@ -109,8 +109,7 @@ class AlbumCoverStylePreferenceDialog : DialogFragment(),
|
|||
val albumCoverStyle = values()[position]
|
||||
|
||||
val inflater = LayoutInflater.from(context)
|
||||
val binding = PreferenceNowPlayingScreenItemBinding.inflate(inflater, collection, false)
|
||||
collection.addView(binding.root)
|
||||
val binding = PreferenceNowPlayingScreenItemBinding.inflate(inflater, collection, true)
|
||||
|
||||
Glide.with(context).load(albumCoverStyle.drawableResId).into(binding.image)
|
||||
binding.title.setText(albumCoverStyle.titleRes)
|
||||
|
|
|
@ -115,14 +115,13 @@ private class NowPlayingScreenAdapter(private val context: Context) : PagerAdapt
|
|||
val nowPlayingScreen = values()[position]
|
||||
|
||||
val inflater = LayoutInflater.from(context)
|
||||
val binding = PreferenceNowPlayingScreenItemBinding.inflate(inflater, collection, false )
|
||||
collection.addView(binding.root)
|
||||
val binding = PreferenceNowPlayingScreenItemBinding.inflate(inflater, collection, true)
|
||||
Glide.with(context).load(nowPlayingScreen.drawableResId).into(binding.image)
|
||||
binding.title.setText(nowPlayingScreen.titleRes)
|
||||
if (isNowPlayingThemes(nowPlayingScreen)) {
|
||||
binding.proText.show()
|
||||
binding.proText.setText(R.string.pro)
|
||||
}else{
|
||||
} else {
|
||||
binding.proText.hide()
|
||||
}
|
||||
return binding.root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue