Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3a02b3c authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

Use custom divider for messageListItem

parent b891a245
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -150,8 +150,10 @@ class MessageListAdapter internal constructor(
        if (isInSelectionMode) {
            if (isSelected) {
                holder.selected.setImageResource(R.drawable.ic_check_circle_large)
                holder.endDivider.setBackgroundResource(R.color.color_selected_divider)
            } else {
                holder.selected.setImageResource(R.drawable.ic_non_check_circle_large)
                holder.endDivider.setBackgroundResource(R.color.color_default_divider)
            }
            holder.selected.isVisible = true
            holder.date.visibility = INVISIBLE
@@ -162,6 +164,7 @@ class MessageListAdapter internal constructor(
            holder.selected.isVisible = false
            holder.date.visibility = VISIBLE
            holder.rightCheveron.visibility = VISIBLE
            holder.endDivider.setBackgroundResource(R.color.color_default_divider)
        }

        with(message) {
+1 −0
Original line number Diff line number Diff line
@@ -22,4 +22,5 @@ class MessageViewHolder(view: View) {
    val status: ImageView = view.findViewById(R.id.status)
    val unreadMessageIndicator : View = view.findViewById(R.id.unread_message_indicator)
    val rightCheveron : View = view.findViewById(R.id.right_chevron)
    val endDivider : View = view.findViewById(R.id.end_divider)
}
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="5"
        android:divider="@android:color/transparent"
        tools:listitem="@layout/message_list_item"/>

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+183 −169
Original line number Diff line number Diff line
@@ -5,9 +5,15 @@
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical"
    android:orientation="horizontal"
    android:orientation="vertical"
    tools:layout_height="?android:attr/listPreferredItemHeight">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:orientation="horizontal">

        <View
            android:id="@+id/unread_message_indicator"
            android:layout_width="10dp"
@@ -204,4 +210,12 @@
                android:contentDescription="@null"
                android:src="@drawable/ic_chevron_right_small" />
        </RelativeLayout>

    </LinearLayout>
    <View
        android:id="@+id/end_divider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_marginTop="7dp"
        android:background="@color/color_default_divider" />
</LinearLayout>
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
    <color name="color_default_ternary_text">#61FFFFFF</color>

    <color name="color_compose_divider">#6BFFFFFF</color>
    <color name="color_selected_divider">#470086FF</color>
    <color name="color_message_compose_common_divider">#14FFFFFF</color>
    <color name="color_quote_background">#2e2e2e</color>

Loading