public void bind(Comment comment) {
Glide.with(itemView.getContext()).load(comment.getUser().getAvatarUrl())
.asBitmap()
.centerCrop()
.into(new BitmapImageViewTarget(avatar) {
@Override
protected void setResource(Bitmap resource) {
RoundedBitmapDrawable circularBitmapDrawable =
RoundedBitmapDrawableFactory.create(itemView.getContext().getResources(), resource);
circularBitmapDrawable.setCircular(true);
avatar.setImageDrawable(circularBitmapDrawable);
}
});
name.setText(comment.getUser().getName());
content.setText(comment.getBody());
LinkUtils.setTextWithLinks(content, comment.getBody());
time.setText(DateUtils.parse(comment.getCreatedAt()));
}
CommentViewHolder.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:bridddle-for-dribbble
作者:
评论列表
文章目录