Shape radius different with RoundedCornersTransformation size
anthony3637 opened this issue · comments
anthony3637 commented
Describe the bug
1: we used the shape file to view's background
2: we used coil's RoundedCornersTransformation
but radius size difference, how to resolve it
shape.xml
`
<solid android:color="#22229900"/>
<corners android:radius="50dp"/>
`
activity xml:
![image](https://user-images.githubusercontent.com/4946107/170238402-3aa75c0e-3acd-49bb-ad7d-e9aaaee2324e.png)
activity code:
val current = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 50f, resources.displayMetrics) binding.img.load("xxx.jpg"){ transformations(RoundedCornersTransformation(current)) }
finally, we found different radius
Colin White commented
Please ask usage questions in GitHub discussions.