2018-10-19 15:26:38 +03:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-05-16 20:14:02 +03:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
2018-10-28 21:18:14 +03:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
2018-10-19 15:26:38 +03:00
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
2018-10-29 19:20:08 +03:00
|
|
|
android:id="@+id/itemRoomLayout"
|
2018-10-19 15:26:38 +03:00
|
|
|
android:layout_width="match_parent"
|
2018-10-28 21:18:14 +03:00
|
|
|
android:layout_height="wrap_content"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:background="?android:colorBackground"
|
2018-10-30 13:47:05 +03:00
|
|
|
android:clickable="true"
|
2019-06-10 16:35:05 +03:00
|
|
|
android:focusable="true"
|
|
|
|
android:foreground="?attr/selectableItemBackground">
|
2018-10-29 19:20:08 +03:00
|
|
|
|
2019-09-19 13:42:01 +03:00
|
|
|
<View
|
|
|
|
android:id="@+id/roomUnreadIndicator"
|
|
|
|
android:layout_width="4dp"
|
|
|
|
android:layout_height="0dp"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:background="?colorSecondary"
|
2020-01-11 22:43:47 +03:00
|
|
|
android:visibility="gone"
|
2019-09-19 13:42:01 +03:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2020-01-11 22:43:47 +03:00
|
|
|
tools:visibility="visible" />
|
2019-09-19 13:42:01 +03:00
|
|
|
|
2020-02-05 19:54:40 +03:00
|
|
|
<FrameLayout
|
|
|
|
android:id="@+id/roomAvatarContainer"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-29 13:21:45 +03:00
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginTop="12dp"
|
2019-05-16 20:14:02 +03:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-02-05 19:54:40 +03:00
|
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/roomAvatarImageView"
|
|
|
|
android:layout_width="56dp"
|
|
|
|
android:layout_height="56dp"
|
2021-08-01 23:03:59 +03:00
|
|
|
android:importantForAccessibility="no"
|
2021-05-10 23:34:13 +03:00
|
|
|
tools:src="@sample/room_round_avatars" />
|
2020-02-05 19:54:40 +03:00
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/roomAvatarCheckedImageView"
|
|
|
|
android:layout_width="56dp"
|
|
|
|
android:layout_height="56dp"
|
2021-02-12 22:04:00 +03:00
|
|
|
android:contentDescription="@string/a11y_checked"
|
2020-02-05 19:54:40 +03:00
|
|
|
android:scaleType="centerInside"
|
|
|
|
android:src="@drawable/ic_material_done"
|
2020-10-08 10:22:55 +03:00
|
|
|
app:tint="@android:color/white"
|
|
|
|
tools:ignore="MissingPrefix" />
|
2020-02-05 19:54:40 +03:00
|
|
|
|
|
|
|
</FrameLayout>
|
2019-05-16 20:14:02 +03:00
|
|
|
|
2020-07-22 16:21:48 +03:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/roomAvatarFailSendingImageView"
|
|
|
|
android:layout_width="16dp"
|
|
|
|
android:layout_height="16dp"
|
2021-02-12 19:44:12 +03:00
|
|
|
android:contentDescription="@string/a11y_error_some_message_not_sent"
|
2020-08-13 19:49:19 +03:00
|
|
|
android:src="@drawable/ic_warning_badge"
|
2020-07-22 16:21:48 +03:00
|
|
|
app:layout_constraintCircle="@id/roomAvatarContainer"
|
|
|
|
app:layout_constraintCircleAngle="45"
|
|
|
|
app:layout_constraintCircleRadius="30dp"
|
2020-08-13 19:49:19 +03:00
|
|
|
tools:ignore="MissingConstraints" />
|
2020-07-22 16:21:48 +03:00
|
|
|
|
2021-05-07 17:41:30 +03:00
|
|
|
<!-- Note: this is always gone now -->
|
2021-02-12 20:47:13 +03:00
|
|
|
<im.vector.app.core.ui.views.ShieldImageView
|
2020-01-31 18:10:52 +03:00
|
|
|
android:id="@+id/roomAvatarDecorationImageView"
|
|
|
|
android:layout_width="24dp"
|
|
|
|
android:layout_height="24dp"
|
2020-02-05 19:54:40 +03:00
|
|
|
app:layout_constraintCircle="@id/roomAvatarContainer"
|
2020-01-31 18:10:52 +03:00
|
|
|
app:layout_constraintCircleAngle="135"
|
|
|
|
app:layout_constraintCircleRadius="28dp"
|
2021-05-07 17:41:30 +03:00
|
|
|
tools:ignore="MissingConstraints"
|
|
|
|
tools:visibility="gone" />
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/roomAvatarPublicDecorationImageView"
|
2021-05-10 15:23:36 +03:00
|
|
|
android:layout_width="20dp"
|
|
|
|
android:layout_height="20dp"
|
2021-05-07 17:41:30 +03:00
|
|
|
android:background="@drawable/background_circle"
|
|
|
|
android:contentDescription="@string/a11y_public_room"
|
2021-05-10 15:23:36 +03:00
|
|
|
android:padding="2dp"
|
2021-05-07 17:41:30 +03:00
|
|
|
android:src="@drawable/ic_public_room"
|
|
|
|
android:visibility="gone"
|
|
|
|
app:layout_constraintCircle="@id/roomAvatarContainer"
|
|
|
|
app:layout_constraintCircleAngle="135"
|
|
|
|
app:layout_constraintCircleRadius="28dp"
|
|
|
|
tools:ignore="MissingConstraints"
|
|
|
|
tools:visibility="visible" />
|
2020-01-31 18:10:52 +03:00
|
|
|
|
2019-05-29 13:21:45 +03:00
|
|
|
<!-- Margin bottom does not work, so I use space -->
|
|
|
|
<Space
|
|
|
|
android:id="@+id/roomAvatarBottomSpace"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="12dp"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-02-05 19:54:40 +03:00
|
|
|
app:layout_constraintTop_toBottomOf="@id/roomAvatarContainer"
|
2019-05-29 13:21:45 +03:00
|
|
|
tools:layout_marginStart="20dp" />
|
|
|
|
|
2020-07-10 23:35:51 +03:00
|
|
|
<TextView
|
2019-05-16 20:14:02 +03:00
|
|
|
android:id="@+id/roomNameView"
|
2021-06-16 12:59:08 +03:00
|
|
|
style="@style/Widget.Vector.TextView.Subtitle"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:layout_width="wrap_content"
|
2018-10-28 21:18:14 +03:00
|
|
|
android:layout_height="wrap_content"
|
2019-05-29 13:21:45 +03:00
|
|
|
android:layout_marginStart="@dimen/layout_horizontal_margin"
|
2019-05-20 18:13:12 +03:00
|
|
|
android:layout_marginTop="12dp"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:layout_marginEnd="8dp"
|
2018-10-29 22:29:09 +03:00
|
|
|
android:duplicateParentState="true"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxLines="1"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:textColor="?vctr_content_primary"
|
2019-07-15 18:29:37 +03:00
|
|
|
android:textStyle="bold"
|
2019-05-17 18:07:02 +03:00
|
|
|
app:layout_constrainedWidth="true"
|
2019-09-12 16:14:17 +03:00
|
|
|
app:layout_constraintEnd_toStartOf="@+id/roomDraftBadge"
|
2019-05-17 18:07:02 +03:00
|
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
|
|
app:layout_constraintHorizontal_chainStyle="packed"
|
2020-02-05 19:54:40 +03:00
|
|
|
app:layout_constraintStart_toEndOf="@id/roomAvatarContainer"
|
2019-05-20 18:13:12 +03:00
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2021-05-10 23:49:11 +03:00
|
|
|
tools:text="@sample/users.json/data/displayName" />
|
2018-10-30 13:47:05 +03:00
|
|
|
|
2019-09-12 16:14:17 +03:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/roomDraftBadge"
|
|
|
|
android:layout_width="16dp"
|
|
|
|
android:layout_height="16dp"
|
2020-08-13 19:49:19 +03:00
|
|
|
android:layout_marginStart="4dp"
|
|
|
|
android:layout_marginEnd="4dp"
|
2021-02-12 19:44:12 +03:00
|
|
|
android:contentDescription="@string/a11y_unsent_draft"
|
2019-09-12 16:14:17 +03:00
|
|
|
android:src="@drawable/ic_edit"
|
|
|
|
android:visibility="gone"
|
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/roomNameView"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/roomUnreadCounterBadgeView"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/roomNameView"
|
|
|
|
app:layout_constraintTop_toTopOf="@+id/roomNameView"
|
2021-06-09 12:51:04 +03:00
|
|
|
app:tint="?vctr_content_primary"
|
2021-02-12 19:44:12 +03:00
|
|
|
tools:ignore="MissingPrefix"
|
|
|
|
tools:visibility="visible" />
|
2019-09-12 16:14:17 +03:00
|
|
|
|
2020-08-03 19:23:05 +03:00
|
|
|
<im.vector.app.features.home.room.list.UnreadCounterBadgeView
|
2019-05-17 18:07:02 +03:00
|
|
|
android:id="@+id/roomUnreadCounterBadgeView"
|
2021-06-16 12:59:08 +03:00
|
|
|
style="@style/Widget.Vector.TextView.Micro"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:layout_width="wrap_content"
|
2019-05-17 11:19:19 +03:00
|
|
|
android:layout_height="wrap_content"
|
2019-05-20 18:13:12 +03:00
|
|
|
android:layout_marginEnd="8dp"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:gravity="center"
|
|
|
|
android:minWidth="16dp"
|
|
|
|
android:minHeight="16dp"
|
2020-08-13 19:49:19 +03:00
|
|
|
android:paddingStart="4dp"
|
|
|
|
android:paddingEnd="4dp"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:textColor="?colorOnError"
|
2019-09-12 16:14:17 +03:00
|
|
|
android:visibility="gone"
|
2019-05-20 18:13:12 +03:00
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/roomNameView"
|
2019-05-17 18:07:02 +03:00
|
|
|
app:layout_constraintEnd_toStartOf="@+id/roomLastEventTimeView"
|
2019-09-12 16:14:17 +03:00
|
|
|
app:layout_constraintStart_toEndOf="@+id/roomDraftBadge"
|
2019-05-20 18:13:12 +03:00
|
|
|
app:layout_constraintTop_toTopOf="@+id/roomNameView"
|
2019-05-17 18:07:02 +03:00
|
|
|
tools:background="@drawable/bg_unread_highlight"
|
2019-09-12 16:14:17 +03:00
|
|
|
tools:text="4"
|
|
|
|
tools:visibility="visible" />
|
2019-05-17 11:19:19 +03:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/roomLastEventTimeView"
|
2021-06-16 12:59:08 +03:00
|
|
|
style="@style/Widget.Vector.TextView.Caption"
|
2019-05-16 20:14:02 +03:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-20 18:13:12 +03:00
|
|
|
android:layout_marginEnd="8dp"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:textColor="?vctr_content_secondary"
|
2019-05-20 18:13:12 +03:00
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/roomNameView"
|
2019-05-16 20:14:02 +03:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
2019-05-20 18:13:12 +03:00
|
|
|
app:layout_constraintTop_toTopOf="@+id/roomNameView"
|
2019-05-17 11:19:19 +03:00
|
|
|
tools:text="@tools:sample/date/hhmm" />
|
|
|
|
|
2020-07-10 23:35:51 +03:00
|
|
|
<TextView
|
2019-05-17 18:07:02 +03:00
|
|
|
android:id="@+id/roomLastEventView"
|
2021-06-16 12:59:08 +03:00
|
|
|
style="@style/Widget.Vector.TextView.Body"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:layout_width="0dp"
|
2019-05-20 18:13:12 +03:00
|
|
|
android:layout_height="wrap_content"
|
2019-05-29 13:21:45 +03:00
|
|
|
android:layout_marginTop="3dp"
|
2019-05-20 18:13:12 +03:00
|
|
|
android:layout_marginEnd="8dp"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxLines="2"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:textColor="?vctr_content_secondary"
|
2019-05-17 18:07:02 +03:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="@+id/roomNameView"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
|
2021-05-10 23:53:51 +03:00
|
|
|
tools:text="@sample/messages.json/data/message" />
|
2019-05-29 13:21:45 +03:00
|
|
|
|
2020-07-10 23:35:51 +03:00
|
|
|
<TextView
|
2020-01-11 22:43:47 +03:00
|
|
|
android:id="@+id/roomTypingView"
|
2021-06-16 12:59:08 +03:00
|
|
|
style="@style/Widget.Vector.TextView.Body"
|
2020-01-11 22:43:47 +03:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="3dp"
|
|
|
|
android:layout_marginEnd="8dp"
|
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxLines="2"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:textColor="?colorPrimary"
|
2020-01-11 22:43:47 +03:00
|
|
|
android:textStyle="bold"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="@+id/roomNameView"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
|
|
|
|
tools:text="Alice is typing…" />
|
|
|
|
|
2019-05-29 13:21:45 +03:00
|
|
|
<!-- Margin bottom does not work, so I use space -->
|
|
|
|
<Space
|
|
|
|
android:id="@+id/roomLastEventBottomSpace"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="7dp"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/roomLastEventView"
|
|
|
|
tools:layout_marginStart="120dp" />
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.Barrier
|
|
|
|
android:id="@+id/roomBottomBarrier"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:barrierDirection="bottom"
|
|
|
|
app:constraint_referenced_ids="roomAvatarBottomSpace,roomLastEventBottomSpace" />
|
2019-05-17 18:07:02 +03:00
|
|
|
|
2021-06-09 12:51:04 +03:00
|
|
|
<!-- We use vctr_list_separator_system here for a better rendering -->
|
2019-05-20 18:13:12 +03:00
|
|
|
<View
|
|
|
|
android:id="@+id/roomDividerView"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="1dp"
|
2021-06-09 12:51:04 +03:00
|
|
|
android:background="?vctr_list_separator_system"
|
2019-05-29 13:21:45 +03:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/roomBottomBarrier" />
|
2019-05-17 18:07:02 +03:00
|
|
|
|
2019-05-16 20:14:02 +03:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|