Added icons for material design and Updated the Album style for Now playing themes

This commit is contained in:
h4h13 2020-05-06 02:11:07 +05:30
parent fd22134a23
commit c8837f13ef
18 changed files with 165 additions and 86 deletions

View file

@ -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),
}

View file

@ -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()
}
}
}

View file

@ -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)
}
}