Skip to content

Instantly share code, notes, and snippets.

@raghunandankavi2010
Created March 11, 2017 09:56
Show Gist options
  • Save raghunandankavi2010/30f089ac79d7cd246aea8a28e16856a7 to your computer and use it in GitHub Desktop.
Save raghunandankavi2010/30f089ac79d7cd246aea8a28e16856a7 to your computer and use it in GitHub Desktop.
Glide loading image code
Glide.with(activity).load(feedItems.get(position).getUser_details().getUser_profile_image())
.asBitmap().centerCrop()
.placeholder(R.drawable.pod_h)
.into(new BitmapImageViewTarget(viewHolder.profilePic) {
@Override
protected void setResource(Bitmap resource) {
RoundedBitmapDrawable circularBitmapDrawable =
RoundedBitmapDrawableFactory.create(activity.getResources(), resource);
circularBitmapDrawable.setCircular(true);
viewHolder.profilePic.setImageDrawable(circularBitmapDrawable);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment