aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui/ConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 01:25:56 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 01:25:56 +0100
commit43531113b798cda6b2f76257641f38b0af986437 (patch)
tree73107f086ec5d772a9041aa3ad4b1c7b8e0dcce9 /src/de/gultsch/chat/ui/ConversationActivity.java
parentc3e4f0eaacf8ab32ceab32b8f46e8b7d85c71cfb (diff)
more code cleanup for xmpp parser. more eventy. nice unknown contact pictures
Diffstat (limited to '')
-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 d831f9b8..79d1e218 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;