Dialog corner and Filter song duration
This commit is contained in:
parent
a5a27e62aa
commit
fc868e1c2e
75 changed files with 1409 additions and 1294 deletions
|
@ -5,6 +5,8 @@ import android.content.res.ColorStateList
|
|||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.retromusic.R
|
||||
|
||||
|
@ -31,8 +33,20 @@ class ColorIconsImageView : AppCompatImageView {
|
|||
|
||||
private fun setIconBackgroundColor(color: Int) {
|
||||
setBackgroundResource(R.drawable.color_circle_gradient)
|
||||
backgroundTintList = ColorStateList.valueOf(ColorUtil.adjustAlpha(color, 0.3f))
|
||||
imageTintList = ColorStateList.valueOf(color)
|
||||
|
||||
val alpha = if (ATHUtil.isWindowBackgroundDark(context)) {
|
||||
1.0f
|
||||
} else {
|
||||
0.28f
|
||||
}
|
||||
val filterColor = if (ATHUtil.isWindowBackgroundDark(context)) {
|
||||
ThemeStore.textColorPrimary(context)
|
||||
} else {
|
||||
color
|
||||
}
|
||||
|
||||
backgroundTintList = ColorStateList.valueOf(ColorUtil.adjustAlpha(color, alpha))
|
||||
imageTintList = ColorStateList.valueOf(filterColor)
|
||||
requestLayout()
|
||||
invalidate()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue