Make ripple more visible on top field
This commit is contained in:
parent
4c5a355431
commit
3b5a5b31f8
|
@ -84,7 +84,12 @@ class ConverterView @JvmOverloads constructor(
|
|||
)
|
||||
}
|
||||
|
||||
binding.topUnitHolder.backgroundTintList = ColorStateList.valueOf(context.getProperPrimaryColor().lightenColor().adjustAlpha(LOWER_ALPHA))
|
||||
val rippleDrawable = ResourcesCompat.getDrawable(
|
||||
resources, R.drawable.colored_ripple, context.theme
|
||||
)?.constantState?.newDrawable()?.mutate() as RippleDrawable
|
||||
val rippleColoredLayer = rippleDrawable.findDrawableByLayerId(R.id.colored_background) as GradientDrawable
|
||||
rippleColoredLayer.applyColorFilter(context.getProperPrimaryColor().lightenColor().adjustAlpha(LOWER_ALPHA))
|
||||
binding.topUnitHolder.background = rippleDrawable
|
||||
binding.swapButton?.applyColorFilter(context.getProperPrimaryColor())
|
||||
|
||||
listOf(binding.topUnitSymbol, binding.bottomUnitSymbol).forEach {
|
||||
|
|
Loading…
Reference in New Issue