diff --git a/res/drawable-hdpi/ic_indicator.png b/res/drawable-hdpi/ic_indicator.png
new file mode 100644
index 000000000..6de8969fa
Binary files /dev/null and b/res/drawable-hdpi/ic_indicator.png differ
diff --git a/res/drawable-mdpi/ic_indicator.png b/res/drawable-mdpi/ic_indicator.png
new file mode 100644
index 000000000..bb4fee105
Binary files /dev/null and b/res/drawable-mdpi/ic_indicator.png differ
diff --git a/res/drawable-xhdpi/ic_indicator.png b/res/drawable-xhdpi/ic_indicator.png
new file mode 100644
index 000000000..3e5141c28
Binary files /dev/null and b/res/drawable-xhdpi/ic_indicator.png differ
diff --git a/res/drawable-xxhdpi/ic_indicator.png b/res/drawable-xxhdpi/ic_indicator.png
new file mode 100644
index 000000000..2c51b8b76
Binary files /dev/null and b/res/drawable-xxhdpi/ic_indicator.png differ
diff --git a/res/layout/message_recieved.xml b/res/layout/message_recieved.xml
index 2ae830346..c11c00876 100644
--- a/res/layout/message_recieved.xml
+++ b/res/layout/message_recieved.xml
@@ -23,20 +23,37 @@
+
+ android:id="@+id/message_time"
+ android:layout_gravity="center_vertical"
+ android:gravity="center_vertical"/>
+
+
+
+ android:padding="8dp" >
-
+ android:background="@drawable/message_border"
+ android:minHeight="48dp" >
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+ android:scaleType="fitXY"
+ android:src="@drawable/ic_profile" />
+
+
\ No newline at end of file
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index d8ead9a62..7385d8a96 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -239,6 +239,7 @@ public class ConversationFragment extends Fragment {
.findViewById(R.id.message_body);
viewHolder.time = (TextView) view
.findViewById(R.id.message_time);
+ viewHolder.indicator = (ImageView) view.findViewById(R.id.security_indicator);
view.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) view.getTag();
@@ -266,12 +267,22 @@ public class ConversationFragment extends Fragment {
viewHolder.messageBody.setTextColor(0xff33B5E5);
viewHolder.messageBody.setTypeface(null,
Typeface.ITALIC);
+ viewHolder.indicator.setVisibility(View.VISIBLE);
+ } else if ((item.getEncryption() == Message.ENCRYPTION_OTR)||(item.getEncryption() == Message.ENCRYPTION_DECRYPTED)) {
+ viewHolder.messageBody.setText(body.trim());
+ viewHolder.messageBody.setTextColor(0xff000000);
+ viewHolder.messageBody.setTypeface(null,
+ Typeface.NORMAL);
+ viewHolder.indicator.setVisibility(View.VISIBLE);
} else {
viewHolder.messageBody.setText(body.trim());
viewHolder.messageBody.setTextColor(0xff000000);
viewHolder.messageBody.setTypeface(null,
Typeface.NORMAL);
+ viewHolder.indicator.setVisibility(View.GONE);
}
+ } else {
+ viewHolder.indicator.setVisibility(View.GONE);
}
if (item.getStatus() == Message.STATUS_UNSEND) {
viewHolder.time.setTypeface(null, Typeface.ITALIC);
@@ -554,6 +565,7 @@ public class ConversationFragment extends Fragment {
private static class ViewHolder {
+ protected ImageView indicator;
protected TextView time;
protected TextView messageBody;
protected ImageView imageView;