diff --git a/res/drawable-hdpi/list_selected_holo_light.9.png b/res/drawable-hdpi/list_selected_holo_light.9.png
new file mode 100644
index 000000000..e20b02d52
Binary files /dev/null and b/res/drawable-hdpi/list_selected_holo_light.9.png differ
diff --git a/res/drawable-hdpi/list_selector_background_selected.9.png b/res/drawable-hdpi/list_selector_background_selected.9.png
new file mode 100644
index 000000000..cbf50b3a1
Binary files /dev/null and b/res/drawable-hdpi/list_selector_background_selected.9.png differ
diff --git a/res/drawable-mdpi/list_selected_holo_light.9.png b/res/drawable-mdpi/list_selected_holo_light.9.png
new file mode 100644
index 000000000..13cb1317e
Binary files /dev/null and b/res/drawable-mdpi/list_selected_holo_light.9.png differ
diff --git a/res/drawable-mdpi/list_selector_background_selected.9.png b/res/drawable-mdpi/list_selector_background_selected.9.png
new file mode 100644
index 000000000..a4ac1e30c
Binary files /dev/null and b/res/drawable-mdpi/list_selector_background_selected.9.png differ
diff --git a/res/drawable-xhdpi/list_selected_holo_light.9.png b/res/drawable-xhdpi/list_selected_holo_light.9.png
new file mode 100644
index 000000000..ee5eb6ffa
Binary files /dev/null and b/res/drawable-xhdpi/list_selected_holo_light.9.png differ
diff --git a/res/drawable-xhdpi/list_selector_background_selected.9.png b/res/drawable-xhdpi/list_selector_background_selected.9.png
new file mode 100644
index 000000000..78358fe1a
Binary files /dev/null and b/res/drawable-xhdpi/list_selector_background_selected.9.png differ
diff --git a/res/drawable/conversation_list_item_background_read.xml b/res/drawable/conversation_list_item_background_read.xml
new file mode 100644
index 000000000..dfc7f7820
--- /dev/null
+++ b/res/drawable/conversation_list_item_background_read.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
diff --git a/res/drawable/conversation_list_item_background_unread.xml b/res/drawable/conversation_list_item_background_unread.xml
new file mode 100644
index 000000000..042face30
--- /dev/null
+++ b/res/drawable/conversation_list_item_background_unread.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
diff --git a/res/values/colors.xml b/res/values/colors.xml
index ea9376b4a..37fd0fb39 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -2,4 +2,7 @@
#ffffffff
#ff000000
+
+ #ffffffff
+ #ffeeeeee
\ No newline at end of file
diff --git a/src/org/thoughtcrime/securesms/ConversationListItem.java b/src/org/thoughtcrime/securesms/ConversationListItem.java
index 9beb9ca88..2fc7684d8 100644
--- a/src/org/thoughtcrime/securesms/ConversationListItem.java
+++ b/src/org/thoughtcrime/securesms/ConversationListItem.java
@@ -113,7 +113,9 @@ public class ConversationListItem extends RelativeLayout
this.subjectView.setText(thread.getBody(), TextView.BufferType.SPANNABLE);
if (thread.getEmphasis())
- ((Spannable)this.subjectView.getText()).setSpan(new StyleSpan(android.graphics.Typeface.ITALIC), 0, this.subjectView.getText().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ ((Spannable)this.subjectView.getText()).setSpan(new StyleSpan(android.graphics.Typeface.ITALIC), 0,
+ this.subjectView.getText().length(),
+ Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
if (thread.getDate() > 0)
this.dateView.setText(DateUtils.getRelativeTimeSpanString(getContext(), thread.getDate(), false));
@@ -124,6 +126,7 @@ public class ConversationListItem extends RelativeLayout
if (batchMode) checkbox.setVisibility(View.VISIBLE);
else checkbox.setVisibility(View.GONE);
+ setBackground(read, batchMode);
setContactPhoto(this.recipients.getPrimaryRecipient());
}
@@ -167,6 +170,16 @@ public class ConversationListItem extends RelativeLayout
}
}
+ private void setBackground(boolean read, boolean batch) {
+ if (batch && checkbox.isChecked()) {
+ setBackgroundResource(R.drawable.list_selected_holo_light);
+ } else if (read) {
+ setBackgroundResource(R.drawable.conversation_list_item_background_read);
+ } else {
+ setBackgroundResource(R.drawable.conversation_list_item_background_unread);
+ }
+ }
+
private boolean isBadgeEnabled() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}
@@ -203,6 +216,8 @@ public class ConversationListItem extends RelativeLayout
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) selectedThreads.add(threadId);
else selectedThreads.remove(threadId);
+
+ setBackground(read, true);
}
}