android: create circular image with picasso

后端 未结 10 823
天命终不由人
天命终不由人 2020-11-29 18:31

The question had been asked and there had been a promise made for the very version of Picasso that I am using: How do I send a circular bitmap to an ImageView using Picasso?

10条回答
  •  天涯浪人
    2020-11-29 18:38

    There is a transformation library for Picasso.

    Just add gradle dependency

    implementation 'jp.wasabeef:picasso-transformations:2.2.1'
    

    End use it

    Picasso.with(context)
           .load(url)
           .resize(w, h)
           .transform(new CropCircleTransformation())
           .into(imageview);
    

    Wiki: Picasso Transformations

提交回复
热议问题