Skip to content

Commit

Permalink
add setImageUrl(int viewId, String imageUrl, int defResourceId)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadCym committed Apr 27, 2016
1 parent 353f761 commit 4c64a66
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ public BaseViewHolder setImageUrl(int viewId, String imageUrl) {
return this;
}

public BaseViewHolder setImageUrl(int viewId, String imageUrl, int defResourceId) {
ImageView view = getView(viewId);
Glide.with(context).load(imageUrl).crossFade().placeholder(defResourceId).into(view);
return this;
}


/**
* Add an action to set the image of an image view. Can be called multiple times.
Expand Down

0 comments on commit 4c64a66

Please sign in to comment.