aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res/layout
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-12-28 14:17:58 +0100
committersteckbrief <steckbrief@chefmail.de>2016-12-28 14:17:58 +0100
commit7190f3c5406396bfbb8f128a07d2e74929502043 (patch)
tree14f517ece3e37189d6a3939d219be7d338c52116 /src/main/res/layout
parente98aa48990d08b75f689c794bf720c5efe21a4b7 (diff)
Implement FS#239: Show number of unread messages in conversations overview
Diffstat (limited to '')
-rw-r--r--src/main/res/layout/conversation_list_row.xml72
1 files changed, 42 insertions, 30 deletions
diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml
index 74e84593..41fd1b90 100644
--- a/src/main/res/layout/conversation_list_row.xml
+++ b/src/main/res/layout/conversation_list_row.xml
@@ -14,7 +14,7 @@
android:layout_height="match_parent"
android:background="@color/red500"/>
- <FrameLayout
+ <FrameLayout
android:id="@+id/swipeable_item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -25,8 +25,8 @@
android:layout_height="wrap_content"
android:background="?android:selectableItemBackground"
android:orientation="horizontal"
- android:padding="8dp"
- android:id="@+id/conversationListRowContent">
+ android:padding="4dp"
+ android:id="@+id/conversationListRowContent">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/conversation_image"
@@ -36,21 +36,21 @@
android:scaleType="centerCrop"
app:riv_corner_radius="2dp"/>
- <TextView
- android:layout_width="56dp"
- android:layout_height="4dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:id="@+id/status"
- android:layout_below="@+id/conversation_image"
- android:paddingTop="8dp"
- android:paddingRight="8dp"/>
+ <TextView
+ android:layout_width="56dp"
+ android:layout_height="4dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:id="@+id/status"
+ android:layout_below="@+id/conversation_image"
+ android:paddingTop="8dp"
+ android:paddingRight="8dp"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/conversation_image"
- android:paddingLeft="8dp">
+ android:paddingLeft="4dp">
<TextView
android:id="@+id/conversation_name"
@@ -73,22 +73,23 @@
android:layout_marginTop="4dp">
<LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_toLeftOf="@+id/notification_status"
- android:orientation="vertical">
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_toLeftOf="@+id/notification_status"
+ android:orientation="vertical"
+ android:id="@+id/conversation_last">
- <github.ankushsachdeva.emojicon.EmojiconTextView
- android:id="@+id/conversation_lastmsg"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scrollHorizontally="false"
- android:singleLine="true"
+ <github.ankushsachdeva.emojicon.EmojiconTextView
+ android:id="@+id/conversation_lastmsg"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:scrollHorizontally="false"
+ android:singleLine="true"
android:text="This is a placeholder text to show the last messages"
- android:textColor="@color/primaryText"
- android:textSize="?attr/TextSizeBody"
- app:emojiconSize="?attr/EmojiconSizeBody" />
+ android:textColor="@color/primaryText"
+ android:textSize="?attr/TextSizeBody"
+ app:emojiconSize="?attr/EmojiconSizeBody" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/conversation_lastimage"
@@ -103,11 +104,22 @@
android:id="@+id/notification_status"
android:layout_width="16sp"
android:layout_height="16sp"
- android:layout_alignParentRight="true"
android:layout_centerVertical="true"
- android:layout_marginLeft="4dp"
- android:src="@drawable/ic_notifications_grey600_24dp"
- />
+ android:layout_toLeftOf="@+id/conversation_unreadcount"
+ android:src="@drawable/ic_notifications_grey600_24dp" />
+
+ <TextView
+ android:id="@+id/conversation_unreadcount"
+ android:layout_width="16sp"
+ android:layout_height="16sp"
+ android:layout_centerVertical="true"
+ android:layout_alignParentRight="true"
+ android:gravity="right"
+ android:text="1"
+ android:textColor="@color/secondaryText"
+ android:textSize="?attr/TextSizeInfo"
+ android:textStyle="bold"
+ android:visibility="invisible"/>
</RelativeLayout>
<TextView