Remove dagger
This commit is contained in:
parent
8a2b803286
commit
0f8b64534f
18 changed files with 33 additions and 249 deletions
|
@ -1,30 +0,0 @@
|
|||
package code.name.monkey.retromusic.util
|
||||
|
||||
import com.google.android.material.slider.Slider
|
||||
import java.util.*
|
||||
|
||||
class SliderReadTimeLabelFormatter : Slider.LabelFormatter {
|
||||
|
||||
override fun getFormattedValue(value: Float): String {
|
||||
var minutes: Long = value.toLong() / 1000 / 60
|
||||
val seconds: Long = value.toLong() / 1000 % 60
|
||||
return if (minutes < 60) {
|
||||
String.format(
|
||||
Locale.getDefault(),
|
||||
"%01d:%02d",
|
||||
minutes,
|
||||
seconds
|
||||
)
|
||||
} else {
|
||||
val hours = minutes / 60
|
||||
minutes %= 60
|
||||
String.format(
|
||||
Locale.getDefault(),
|
||||
"%d:%02d:%02d",
|
||||
hours,
|
||||
minutes,
|
||||
seconds
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,7 +27,6 @@ import androidx.core.view.ViewCompat
|
|||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||
import com.google.android.material.slider.Slider
|
||||
|
||||
object ViewUtil {
|
||||
|
||||
|
@ -48,16 +47,6 @@ object ViewUtil {
|
|||
}
|
||||
}
|
||||
|
||||
fun setProgressDrawable(progressSlider: Slider, color: Int, thumbTint: Boolean = false) {
|
||||
if (thumbTint) {
|
||||
progressSlider.thumbColor = ColorStateList.valueOf(color)
|
||||
}
|
||||
val colorWithAlpha = ColorUtil.withAlpha(color, 0.25f)
|
||||
progressSlider.haloColor = ColorStateList.valueOf(colorWithAlpha)
|
||||
progressSlider.haloRadius = 0
|
||||
progressSlider.trackColorActive = ColorStateList.valueOf(color)
|
||||
progressSlider.trackColorInactive = ColorStateList.valueOf(colorWithAlpha)
|
||||
}
|
||||
|
||||
fun setProgressDrawable(progressSlider: ProgressBar, newColor: Int) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue