Using picasso library with a circle image view

前端 未结 5 1479
长发绾君心
长发绾君心 2021-01-04 00:45

I am looking at using the Picasso library to download an image from URL and pass this into circle image view, but since picasso requires that you pass in an actual imageView

5条回答
  •  囚心锁ツ
    2021-01-04 01:19

    Take the ID of CircleImageView first :

    CircleImageView mCircleImageView = (CircleImageView)findViewById(R.id.circleImageView);
    

    And pass the ID to Picasso library :

    Picasso.with(mContext).load(Uri.parse(link)).placeholder(drawable).into(mCircleImageView);
    

    This worked for me.

提交回复
热议问题