mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
* Donot show random colors as placeholders for contributions items * Theme contributionsItem background as mainBackground from attributes
This commit is contained in:
parent
3d1ffbb4bc
commit
6416314dda
2 changed files with 1 additions and 2 deletions
|
|
@ -50,8 +50,6 @@ public class ContributionViewHolder extends RecyclerView.ViewHolder {
|
||||||
public void init(int position, Contribution contribution) {
|
public void init(int position, Contribution contribution) {
|
||||||
this.contribution = contribution;
|
this.contribution = contribution;
|
||||||
this.position = position;
|
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());
|
String imageSource = chooseImageSource(contribution.thumbUrl, contribution.getLocalUri());
|
||||||
if (!TextUtils.isEmpty(imageSource)) {
|
if (!TextUtils.isEmpty(imageSource)) {
|
||||||
final ImageRequest imageRequest =
|
final ImageRequest imageRequest =
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/very_large_height"
|
android:layout_height="@dimen/very_large_height"
|
||||||
app:actualImageScaleType="centerCrop"
|
app:actualImageScaleType="centerCrop"
|
||||||
|
android:background="?attr/mainBackground"
|
||||||
fresco:placeholderImage="@drawable/ic_image_black_24dp"
|
fresco:placeholderImage="@drawable/ic_image_black_24dp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue