diff --git a/res/drawable-xhdpi/chat_list_indicator.png b/res/drawable-xhdpi/chat_list_indicator.png
deleted file mode 100644
index 6c3e099bd..000000000
Binary files a/res/drawable-xhdpi/chat_list_indicator.png and /dev/null differ
diff --git a/res/drawable-xhdpi/history_chat_indicator.png b/res/drawable-xhdpi/history_chat_indicator.png
deleted file mode 100644
index b5f736b23..000000000
Binary files a/res/drawable-xhdpi/history_chat_indicator.png and /dev/null differ
diff --git a/res/drawable/unread_message_count_bg.xml b/res/drawable/unread_message_count_bg.xml
new file mode 100644
index 000000000..4a3f66cab
--- /dev/null
+++ b/res/drawable/unread_message_count_bg.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/res/layout-land/call.xml b/res/layout-land/call.xml
index 819a85c20..cf5c8c257 100644
--- a/res/layout-land/call.xml
+++ b/res/layout-land/call.xml
@@ -250,10 +250,10 @@
diff --git a/res/layout-land/chatlist_cell.xml b/res/layout-land/chatlist_cell.xml
index a4c106663..01d24c2bc 100644
--- a/res/layout-land/chatlist_cell.xml
+++ b/res/layout-land/chatlist_cell.xml
@@ -64,9 +64,9 @@
diff --git a/res/layout-sw533dp-land/chatlist_cell.xml b/res/layout-sw533dp-land/chatlist_cell.xml
index ec24b492b..2cc25b94a 100644
--- a/res/layout-sw533dp-land/chatlist_cell.xml
+++ b/res/layout-sw533dp-land/chatlist_cell.xml
@@ -61,9 +61,9 @@
diff --git a/res/layout/chat.xml b/res/layout/chat.xml
index 8af20df73..eefe0ceae 100644
--- a/res/layout/chat.xml
+++ b/res/layout/chat.xml
@@ -195,6 +195,6 @@
android:src="@drawable/security_alert_button"
android:layout_alignParentRight="true"
android:layout_below="@id/top"
- android:layout_marginRight="6dp"/>
+ android:layout_marginRight="12dp"/>
diff --git a/res/layout/chatlist_cell.xml b/res/layout/chatlist_cell.xml
index 3620a7fdc..d563b87ba 100644
--- a/res/layout/chatlist_cell.xml
+++ b/res/layout/chatlist_cell.xml
@@ -64,10 +64,10 @@
-
-
@@ -187,10 +187,10 @@
diff --git a/src/android/org/linphone/chat/ChatRoomViewHolder.java b/src/android/org/linphone/chat/ChatRoomViewHolder.java
index 9273781fa..08116fc45 100644
--- a/src/android/org/linphone/chat/ChatRoomViewHolder.java
+++ b/src/android/org/linphone/chat/ChatRoomViewHolder.java
@@ -46,7 +46,6 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder implements View.
private Bitmap mDefaultBitmap;
private Bitmap mDefaultGroupBitmap;
- public TextView lastMessageSenderView;
public TextView lastMessageView;
public TextView date;
public TextView displayName;
@@ -65,7 +64,6 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder implements View.
mDefaultGroupBitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.chat_group_avatar);
mContext = context;
- lastMessageSenderView = itemView.findViewById(R.id.lastMessageSender);
lastMessageView = itemView.findViewById(R.id.lastMessage);
date = itemView.findViewById(R.id.date);
displayName = itemView.findViewById(R.id.sipUri);
@@ -82,24 +80,22 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder implements View.
public void bindChatRoom(ChatRoom room) {
mRoom = room;
ChatMessage lastMessage = mRoom.getLastMessageInHistory();
- lastMessageView.setVisibility(View.GONE);
lastMessageFileTransfer.setVisibility(View.GONE);
if (lastMessage != null) {
String text = lastMessage.getTextContent();
if (text != null && text.length() > 0) {
- lastMessageView.setVisibility(View.VISIBLE);
- lastMessageView.setText(text);
+ lastMessageView.setText(getSender(mRoom) + text);
}
date.setText(LinphoneUtils.timestampToHumanDate(mContext, mRoom.getLastUpdateTime(), R.string.messages_list_date_format));
for (Content c : lastMessage.getContents()) {
if (c.isFile() || c.isFileTransfer()) {
+ lastMessageView.setText(getSender(mRoom));
lastMessageFileTransfer.setVisibility(View.VISIBLE);
}
}
}
- lastMessageSenderView.setText(getSender(mRoom));
displayName.setText(getContact(mRoom));
unreadMessages.setText(String.valueOf(LinphoneManager.getInstance().getUnreadCountForChatRoom(mRoom)));
getAvatar(mRoom);