Created
March 11, 2017 10:04
-
-
Save raghunandankavi2010/7b536a714f82cbd45a67c95c8a338a99 to your computer and use it in GitHub Desktop.
Glide loding circular image with transformations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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