How to round an image with Glide library?

前端 未结 22 1807
悲哀的现实
悲哀的现实 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条回答
  •  爱一瞬间的悲伤
    2020-11-28 01:00

    In this case I need add shadows, and imageView elevation not working

    implementation "com.github.bumptech.glide:glide:4.10.0"

    XML

    
    
        
    
    

    Shape drawable

    
    
         
    
    

    Glide Configuration

    Glide.with(this)
        .asBitmap()
        .load(item.image)
        .apply(RequestOptions.circleCropTransform())
        .into(iv_item_employee)
    

提交回复
热议问题