vinc3m1/RoundedImageView

How can I display a gif???

Power-Android opened this issue · 2 comments

Glide.with(this).load(url).into(imageview); can work
Glide.with(this).load(url).into(roundImageview); not work
How can I display a gif???

as noted in the readme: Glide transforms are not supported, please use wasabeef/glide-transformations if you want to round images loaded from Glide.

@Power-Android Just use usual ImageView with outline bounds
For example,

fun View.setRoundedCorners(@Px radius: Float) {
    clipToOutline = true
    outlineProvider = object : ViewOutlineProvider() {
        override fun getOutline(view: View, outline: Outline) {
            val selfRect = Rect(0, 0, view.width, view.height)
            outline.setRoundRect(selfRect, radius)
        }
    }
}