Fix Lyrics not visible in MD3 theme

This commit is contained in:
Prathamesh More 2022-05-11 18:38:12 +05:30
parent 93bb652dd6
commit 90e113e8ab
2 changed files with 4 additions and 23 deletions

View file

@ -308,5 +308,5 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(R.layout.fragment_playe
} }
private val lyricViewNpsList = private val lyricViewNpsList =
listOf(Blur, Classic, Color, Flat, Material, Normal, Plain, Simple) listOf(Blur, Classic, Color, Flat, Material, MD3, Normal, Plain, Simple)
} }

View file

@ -17,12 +17,10 @@ package code.name.monkey.retromusic.fragments.player.md3
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import android.view.animation.DecelerateInterpolator
import android.view.animation.LinearInterpolator import android.view.animation.LinearInterpolator
import android.widget.ImageButton import android.widget.ImageButton
import android.widget.SeekBar import android.widget.SeekBar
import android.widget.TextView import android.widget.TextView
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper import code.name.monkey.appthemehelper.util.MaterialValueHelper
@ -108,11 +106,7 @@ class MD3PlaybackControlsFragment :
MaterialValueHelper.getPrimaryDisabledTextColor(requireContext(), false) MaterialValueHelper.getPrimaryDisabledTextColor(requireContext(), false)
} }
val colorFinal = if (PreferenceUtil.isAdaptiveColor) { val colorFinal = accentColor().ripAlpha()
color.primaryTextColor
} else {
ThemeStore.accentColor(requireContext())
}.ripAlpha()
TintHelper.setTintAuto( TintHelper.setTintAuto(
binding.playPauseButton, binding.playPauseButton,
@ -198,22 +192,9 @@ class MD3PlaybackControlsFragment :
setUpPlayPauseFab() setUpPlayPauseFab()
} }
public override fun show() { public override fun show() {}
binding.playPauseButton.animate()
.scaleX(1f)
.scaleY(1f)
.rotation(360f)
.setInterpolator(DecelerateInterpolator())
.start()
}
public override fun hide() { public override fun hide() {}
binding.playPauseButton.apply {
scaleX = 0f
scaleY = 0f
rotation = 0f
}
}
override fun onUpdateProgressViews(progress: Int, total: Int) { override fun onUpdateProgressViews(progress: Int, total: Int) {
binding.progressSlider.max = total binding.progressSlider.max = total