Shapeable image view - corner color - android

249 views Asked by At

In the second fragment I have used shapeable image view with shape appearance overlay to rounded. while applying material container transform, black corner are visible in shapeable image view. Help me how to remove the black corners.

1

There are 1 answers

2
mrzbn On

I faced the same issue recently. I was setting background color to RED for example, but on lower android versions, corners got black just like in your case.

a workaround I came up with was to set background of ImageView using following lines of code:

imageView.background = ShapeDrawable(RectShape()).also {
    it.paint.color = myColor
}