Skip to content

Instantly share code, notes, and snippets.

@raghunandankavi2010
Created March 11, 2017 10:04
Show Gist options
  • Save raghunandankavi2010/7b536a714f82cbd45a67c95c8a338a99 to your computer and use it in GitHub Desktop.
Save raghunandankavi2010/7b536a714f82cbd45a67c95c8a338a99 to your computer and use it in GitHub Desktop.
Glide loding circular image with transformations
if(feedItems.get(position).getUser_details()!=null) {
Glide.with(activity).load(feedItems.get(position).getUser_details().getUser_profile_image())
.bitmapTransform(new CropCircleTransformation(activity))
.placeholder(R.drawable.pod_h)
.into(viewHolder.profilePic);
}else
{
// make sure Glide doesn't load anything into this view until told otherwise
Glide.clear(viewHolder.profilePic);
// remove the placeholder (optional); read comments below
//viewHolder.profilePic.setImageDrawable(null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment