mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-02-16 11:31:01 +01:00
Apply smaller corner radius only on unit backgrounds
This commit is contained in:
parent
89f8502a13
commit
3dcb8fedb5
@ -89,7 +89,9 @@ class ConverterView @JvmOverloads constructor(
|
||||
binding.topUnitHolder.setBackgroundColor(context.getProperBackgroundColor().lightenColor())
|
||||
binding.swapButton.applyColorFilter(context.getProperPrimaryColor())
|
||||
|
||||
val drawable = ResourcesCompat.getDrawable(resources, com.simplemobiletools.commons.R.drawable.pill_background, context.theme) as RippleDrawable
|
||||
val drawable = ResourcesCompat.getDrawable(
|
||||
resources, com.simplemobiletools.commons.R.drawable.pill_background, context.theme
|
||||
)?.constantState?.newDrawable()?.mutate() as RippleDrawable
|
||||
val bgLayerList = drawable.findDrawableByLayerId(com.simplemobiletools.commons.R.id.button_pill_background_holder) as LayerDrawable
|
||||
val bgLayer = bgLayerList.findDrawableByLayerId(com.simplemobiletools.commons.R.id.button_pill_background_shape) as GradientDrawable
|
||||
bgLayer.cornerRadius = context.resources.getDimension(com.simplemobiletools.commons.R.dimen.rounded_corner_radius_big)
|
||||
|
Loading…
x
Reference in New Issue
Block a user