Skip to content

Commit

Permalink
Fixes #3575 (#3602)
Browse files Browse the repository at this point in the history
* Donot show random colors as placeholders for contributions items
* Theme contributionsItem background as mainBackground from attributes
  • Loading branch information
ashishkumar468 authored Mar 30, 2020
1 parent 3d1ffbb commit 6416314
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public class ContributionViewHolder extends RecyclerView.ViewHolder {
public void init(int position, Contribution contribution) {
this.contribution = contribution;
this.position = position;
imageView.getHierarchy().setPlaceholderImage(new ColorDrawable(
Color.argb(100, random.nextInt(256), random.nextInt(256), random.nextInt(256))));
String imageSource = chooseImageSource(contribution.thumbUrl, contribution.getLocalUri());
if (!TextUtils.isEmpty(imageSource)) {
final ImageRequest imageRequest =
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/layout_contribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/very_large_height"
app:actualImageScaleType="centerCrop"
android:background="?attr/mainBackground"
fresco:placeholderImage="@drawable/ic_image_black_24dp"
/>

Expand Down

0 comments on commit 6416314

Please sign in to comment.