From 146edb8c81821ec40c61519ee5911a7c0335ca4a Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sun, 15 Feb 2015 23:25:35 +0100 Subject: [PATCH] made image view background more colorful while waiting on actual avatar to load --- .../eu/siacs/conversations/ui/adapter/ConversationAdapter.java | 2 +- .../eu/siacs/conversations/ui/adapter/ListItemAdapter.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index 02a3dfef..00f90382 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -140,7 +140,7 @@ public class ConversationAdapter extends ArrayAdapter { imageView.setImageBitmap(bm); imageView.setBackgroundColor(0x00000000); } else if (cancelPotentialWork(conversation, imageView)) { - imageView.setBackgroundColor(0xff333333); + imageView.setBackgroundColor(UIHelper.getColorForName(conversation.getName())); final BitmapWorkerTask task = new BitmapWorkerTask(imageView); final AsyncDrawable asyncDrawable = new AsyncDrawable(activity.getResources(), null, task); imageView.setImageDrawable(asyncDrawable); diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java index 37865aca..cd5dfeb4 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java @@ -9,6 +9,7 @@ import eu.siacs.conversations.R; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.ListItem; import eu.siacs.conversations.ui.XmppActivity; +import eu.siacs.conversations.utils.UIHelper; import eu.siacs.conversations.xmpp.jid.Jid; import android.content.Context; @@ -128,7 +129,7 @@ public class ListItemAdapter extends ArrayAdapter { imageView.setImageBitmap(bm); imageView.setBackgroundColor(0x00000000); } else if (cancelPotentialWork(item, imageView)) { - imageView.setBackgroundColor(0xff333333); + imageView.setBackgroundColor(UIHelper.getColorForName(item.getDisplayName())); final BitmapWorkerTask task = new BitmapWorkerTask(imageView); final AsyncDrawable asyncDrawable = new AsyncDrawable(activity.getResources(), null, task); imageView.setImageDrawable(asyncDrawable);