Skip to content

Commit d2bbf92

Browse files
* Donot show random colors as placeholders for contributions items * Theme contributionsItem background as mainBackground from attributes
1 parent 3d1ffbb commit d2bbf92

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

app/src/main/java/fr/free/nrw/commons/contributions/ContributionViewHolder.java

-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ public class ContributionViewHolder extends RecyclerView.ViewHolder {
5050
public void init(int position, Contribution contribution) {
5151
this.contribution = contribution;
5252
this.position = position;
53-
imageView.getHierarchy().setPlaceholderImage(new ColorDrawable(
54-
Color.argb(100, random.nextInt(256), random.nextInt(256), random.nextInt(256))));
5553
String imageSource = chooseImageSource(contribution.thumbUrl, contribution.getLocalUri());
5654
if (!TextUtils.isEmpty(imageSource)) {
5755
final ImageRequest imageRequest =

app/src/main/res/layout/layout_contribution.xml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
android:layout_width="match_parent"
2424
android:layout_height="@dimen/very_large_height"
2525
app:actualImageScaleType="centerCrop"
26+
android:background="?attr/mainBackground"
2627
fresco:placeholderImage="@drawable/ic_image_black_24dp"
2728
/>
2829

0 commit comments

Comments
 (0)