Created
March 11, 2017 09:56
-
-
Save raghunandankavi2010/30f089ac79d7cd246aea8a28e16856a7 to your computer and use it in GitHub Desktop.
Glide loading image code
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
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