aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui/ConversationActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/gultsch/chat/ui/ConversationActivity.java')
-rw-r--r--src/de/gultsch/chat/ui/ConversationActivity.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationActivity.java b/src/de/gultsch/chat/ui/ConversationActivity.java
index d831f9b8b..79d1e218f 100644
--- a/src/de/gultsch/chat/ui/ConversationActivity.java
+++ b/src/de/gultsch/chat/ui/ConversationActivity.java
@@ -9,6 +9,7 @@ import de.gultsch.chat.R;
import de.gultsch.chat.R.id;
import de.gultsch.chat.entities.Conversation;
import de.gultsch.chat.utils.Beautifier;
+import android.net.Uri;
import android.os.Bundle;
import android.app.FragmentTransaction;
import android.content.Context;
@@ -106,6 +107,16 @@ public class ConversationActivity extends XmppActivity {
((TextView) view.findViewById(R.id.conversation_lastmsg)).setText(getItem(position).getLatestMessage());
((TextView) view.findViewById(R.id.conversation_lastupdate))
.setText(Beautifier.readableTimeDifference(getItem(position).getLatestMessageDate()));
+
+ Uri profilePhoto = getItem(position).getProfilePhotoUri();
+ ImageView imageView = (ImageView) view.findViewById(R.id.conversation_image);
+ if (profilePhoto!=null) {
+ imageView.setImageURI(profilePhoto);
+ } else {
+ imageView.setImageBitmap(Beautifier.getUnknownContactPicture(getItem(position).getName(),200));
+ }
+
+
((ImageView) view.findViewById(R.id.conversation_image))
.setImageURI(getItem(position).getProfilePhotoUri());
return view;