Skip to content

Commit

Permalink
FIXED #380, Added placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
opticod committed May 10, 2016
1 parent 6c17aa6 commit bdc8f7d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 0 deletions.
Expand Up @@ -199,6 +199,7 @@ private void setFeatureData() {
.load(imageUrl)
.resize(40, 40)
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(ivFeatureImage);

tvFeatureTitle.setText(title);
Expand Down
Expand Up @@ -126,6 +126,7 @@ public void done(Profile p, ParseException e) {
.load(p.getPhotoFile().getUrl())
.resize(48, 48)
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(ivHeaderPhoto);
}
tvFullName.setText(p.getFullName());
Expand Down
Expand Up @@ -79,6 +79,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
.transform(new CircleTransform())
.resize(40, 40)
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(holder.ivCurrentUserProfile);
}
if (!TextUtils.isEmpty(profile.getFullName())) {
Expand All @@ -105,6 +106,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
.transform(new CircleTransform())
.resize(40, 40)
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(holder.ivOtherProfileLeft);
}
if (!TextUtils.isEmpty(profile.getFullName())) {
Expand Down
Expand Up @@ -106,6 +106,7 @@ private void configureViewHolderTopic(ViewHolderTopic viewHolderTopic, int posit
.load(imageUrl)
.resize(48, 48)
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(ivFeatureImage);
}
}
Expand Down
Expand Up @@ -93,6 +93,7 @@ public void onBindViewHolder(final ViewHolder holder, int position) {
.transform(new CircleTransform())
.resize(40, 40)
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(ivUserPhoto);
} else {
tvPostNameBy.setText(R.string.org_name_short);
Expand Down Expand Up @@ -125,6 +126,9 @@ public void done(Awesome a, ParseException e) {
if (post.getPostPicFile() != null) {
Picasso.with(pf)
.load(post.getPostPicFile().getUrl())
.fit()
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(ivPostPic);
ivPostPic.setVisibility(ImageView.VISIBLE);
}
Expand Down
Expand Up @@ -154,6 +154,7 @@ private void configureViewHolderPost(ViewHolderPost holder, int position) {
.resize(40, 40)
.centerCrop()
.transform(new CircleTransform())
.placeholder(R.mipmap.ic_launcher)
.into(ivPostPhoto);

} else if (event != null) {
Expand Down Expand Up @@ -206,6 +207,9 @@ public void done(Awesome a, ParseException e) {
if (post.getPostPicFile() != null) {
Picasso.with(postPhotoContext)
.load(post.getPostPicFile().getUrl())
.fit()
.centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(ivPostPic);
ivPostPic.setVisibility(ImageView.VISIBLE);
}
Expand Down
Expand Up @@ -46,28 +46,34 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
case 0:
Picasso.with(getContext())
.load(R.drawable.personalization_1)
.placeholder(R.mipmap.ic_launcher)
.into(img1);
Picasso.with(getContext())
.load(R.drawable.personalization_2_dark)
.placeholder(R.mipmap.ic_launcher)
.into(img2);
Picasso.with(getContext())
.load(R.drawable.personalization_3_dark)
.placeholder(R.mipmap.ic_launcher)
.into(img3);
break;
case 1:
img1.setImageResource(R.drawable.personalization);
Picasso.with(getContext())
.load(R.drawable.personalization_2)
.placeholder(R.mipmap.ic_launcher)
.into(img2);
Picasso.with(getContext())
.load(R.drawable.personalization_3_dark)
.placeholder(R.mipmap.ic_launcher)
.into(img3);
break;
case 2:
img1.setImageResource(R.drawable.personalization_done);
img2.setImageResource(R.drawable.personalization);
Picasso.with(getContext())
.load(R.drawable.personalization_3)
.placeholder(R.mipmap.ic_launcher)
.into(img3);
break;

Expand Down

0 comments on commit bdc8f7d

Please sign in to comment.