How to round an image with Glide library?

前端 未结 22 1804
悲哀的现实
悲哀的现实 2020-11-28 00:46

So, anybody know how to display an image with rounded corners with Glide? I am loading an image with Glide, but I don\'t know how to pass rounded params to this library.

22条回答
  •  萌比男神i
    2020-11-28 00:58

    The easiest way (requires Glide 4.x.x)

    Glide.with(context).load(uri).apply(RequestOptions().circleCrop()).into(imageView)
    

提交回复
热议问题