Fixed Material Slider crashes
This commit is contained in:
parent
cee51eb2cc
commit
f04bf4c3aa
1 changed files with 2 additions and 10 deletions
|
@ -82,17 +82,9 @@ abstract class AbsPlayerControlsFragment(@LayoutRes layout: Int) : AbsMusicServi
|
|||
if (seekBar == null) {
|
||||
progressSlider?.valueTo = total.toFloat()
|
||||
|
||||
if (isSeeking) {
|
||||
if (progress > total) return
|
||||
progressSlider?.value = progress.toFloat()
|
||||
} else {
|
||||
progressAnimator =
|
||||
ObjectAnimator.ofFloat(progressSlider, "value", progress.toFloat()).apply {
|
||||
duration = SLIDER_ANIMATION_TIME
|
||||
interpolator = LinearInterpolator()
|
||||
start()
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
seekBar?.max = total
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue