Skip to content

Instantly share code, notes, and snippets.

@virendersran01
Forked from muthuraj57/SetAvatar.java
Created July 11, 2020 11:30
Show Gist options
  • Save virendersran01/35dabcba47ff1d1adc389635fdab812a to your computer and use it in GitHub Desktop.
Save virendersran01/35dabcba47ff1d1adc389635fdab812a to your computer and use it in GitHub Desktop.
placeholder.setText(getInitials());
ViewUtil.setVisibility(avatar, View.GONE);
Glide.with(context)
.load(member.getAvatar())
.asBitmap()
.into(new SimpleTarget<Bitmap>() {
@Override
public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
avatar.setImageBitmap(resource);
ViewUtil.setVisibility(placeholder, View.GONE);
ViewUtil.setVisibility(avatar, View.VISIBLE);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment