Added icons for material design and Updated the Album style for Now playing themes
This commit is contained in:
parent
fd22134a23
commit
c8837f13ef
18 changed files with 165 additions and 86 deletions
|
@ -26,5 +26,5 @@ enum class NowPlayingScreen constructor(
|
|||
PLAIN(R.string.plain, R.drawable.np_plain, 3),
|
||||
SIMPLE(R.string.simple, R.drawable.np_simple, 8),
|
||||
TINY(R.string.tiny, R.drawable.np_tiny, 7),
|
||||
EXAMPLE(R.string.tiny, R.drawable.np_tiny, 16),
|
||||
CLASSIC(R.string.classic, R.drawable.np_tiny, 16),
|
||||
}
|
||||
|
|
|
@ -38,13 +38,15 @@ class ColorFragment : AbsPlayerFragment() {
|
|||
|
||||
ToolbarContentTintHelper.colorizeToolbar(
|
||||
playerToolbar,
|
||||
ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal),
|
||||
color.secondaryTextColor,
|
||||
requireActivity()
|
||||
)
|
||||
colorGradientBackground?.setBackgroundColor(color.backgroundColor)
|
||||
playerActivity?.setLightNavigationBar(ColorUtil.isColorLight(color.backgroundColor))
|
||||
}
|
||||
|
||||
override fun onFavoriteToggled() {
|
||||
//toggleFavorite(MusicPlayerRemote.currentSong)
|
||||
toggleFavorite(MusicPlayerRemote.currentSong)
|
||||
}
|
||||
|
||||
override fun onShow() {
|
||||
|
@ -130,10 +132,7 @@ class ColorFragment : AbsPlayerFragment() {
|
|||
|
||||
companion object {
|
||||
fun newInstance(): ColorFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ColorFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
return ColorFragment()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,9 +140,9 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
|||
|
||||
private fun updatePlayPauseDrawableState() {
|
||||
if (MusicPlayerRemote.isPlaying) {
|
||||
playPauseButton.setImageResource(R.drawable.ic_pause_white_64dp)
|
||||
playPauseButton.setImageResource(R.drawable.ic_pause_sharp_white_64dp)
|
||||
} else {
|
||||
playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_64dp)
|
||||
playPauseButton.setImageResource(R.drawable.ic_play_arrow_sharp_white_64dp)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,18 +189,18 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
|||
override fun updateRepeatState() {
|
||||
when (MusicPlayerRemote.repeatMode) {
|
||||
MusicService.REPEAT_MODE_NONE -> {
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_white_24dp)
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_sharp_white_24dp)
|
||||
repeatButton.setColorFilter(
|
||||
lastDisabledPlaybackControlsColor,
|
||||
PorterDuff.Mode.SRC_IN
|
||||
)
|
||||
}
|
||||
MusicService.REPEAT_MODE_ALL -> {
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_white_24dp)
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_sharp_white_24dp)
|
||||
repeatButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
MusicService.REPEAT_MODE_THIS -> {
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_one_white_24dp)
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_one_sharp_white_24dp)
|
||||
repeatButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue