aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-02-15 23:25:35 +0100
committeriNPUTmice <daniel@gultsch.de>2015-02-15 23:25:35 +0100
commit146edb8c81821ec40c61519ee5911a7c0335ca4a (patch)
treee462e61ac26e0761ddd3fab205bf043ba99c2c2d
parent0485da8488c2e1a671bac3e80b990b9003c1cb91 (diff)
made image view background more colorful while waiting on actual avatar to load
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java3
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<Conversation> {
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<ListItem> {
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);