made image view background more colorful while waiting on actual avatar to load

This commit is contained in:
iNPUTmice 2015-02-15 23:25:35 +01:00
parent 0485da8488
commit 146edb8c81
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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);