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"
|
2019-06-06 15:37:30 +03:00
|
|
|
android:background="?riotx_background"
|
2018-10-30 13:47:05 +03:00
|
|
|
android:clickable="true"
|
2019-06-05 16:27:35 +03:00
|
|
|
android:focusable="true">
|
2018-10-29 19:20:08 +03:00
|
|
|
|
2019-05-16 20:14:02 +03:00
|
|
|
<ImageView
|
|
|
|
android:id="@+id/roomAvatarImageView"
|
2019-05-29 13:21:45 +03:00
|
|
|
android:layout_width="56dp"
|
|
|
|
android:layout_height="56dp"
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginLeft="8dp"
|
|
|
|
android:layout_marginTop="12dp"
|
2019-05-16 20:14:02 +03:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
tools:src="@tools:sample/avatars" />
|
|
|
|
|
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"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/roomAvatarImageView"
|
|
|
|
tools:layout_marginStart="20dp" />
|
|
|
|
|
2019-05-16 20:14:02 +03:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/roomNameView"
|
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"
|
|
|
|
android:layout_marginLeft="@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"
|
2019-05-20 18:13:12 +03:00
|
|
|
android:layout_marginRight="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"
|
2019-06-06 15:37:30 +03:00
|
|
|
android:textColor="?riotx_text_primary"
|
2019-05-29 13:21:45 +03:00
|
|
|
android:textSize="15sp"
|
2019-05-17 18:07:02 +03:00
|
|
|
app:layout_constrainedWidth="true"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/roomUnreadCounterBadgeView"
|
|
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
|
|
app:layout_constraintHorizontal_chainStyle="packed"
|
2019-05-16 20:14:02 +03:00
|
|
|
app:layout_constraintStart_toEndOf="@id/roomAvatarImageView"
|
2019-05-20 18:13:12 +03:00
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2019-05-29 13:21:45 +03:00
|
|
|
tools:text="@sample/matrix.json/data/displayName" />
|
2018-10-30 13:47:05 +03:00
|
|
|
|
2019-05-17 18:07:02 +03:00
|
|
|
<im.vector.riotredesign.features.home.room.list.UnreadCounterBadgeView
|
|
|
|
android:id="@+id/roomUnreadCounterBadgeView"
|
|
|
|
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:layout_marginRight="8dp"
|
|
|
|
android:gravity="center"
|
|
|
|
android:minWidth="16dp"
|
|
|
|
android:minHeight="16dp"
|
|
|
|
android:paddingLeft="4dp"
|
|
|
|
android:paddingRight="4dp"
|
|
|
|
android:textColor="@android:color/white"
|
|
|
|
android:textSize="10sp"
|
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"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/roomNameView"
|
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"
|
|
|
|
tools:text="4" />
|
2019-05-17 11:19:19 +03:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/roomLastEventTimeView"
|
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"
|
|
|
|
android:layout_marginRight="8dp"
|
2019-06-06 15:37:30 +03:00
|
|
|
android:textColor="?riotx_text_secondary"
|
2019-05-29 13:21:45 +03:00
|
|
|
android:textSize="15sp"
|
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" />
|
|
|
|
|
2019-05-17 18:07:02 +03:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/roomLastEventView"
|
|
|
|
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"
|
|
|
|
android:layout_marginRight="8dp"
|
2019-05-17 18:07:02 +03:00
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxLines="2"
|
2019-06-06 15:37:30 +03:00
|
|
|
android:textColor="?riotx_text_secondary"
|
2019-05-29 13:21:45 +03:00
|
|
|
android:textSize="15sp"
|
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"
|
2019-05-29 13:21:45 +03:00
|
|
|
tools:text="@sample/matrix.json/data/message" />
|
|
|
|
|
|
|
|
<!-- 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
|
|
|
|
2019-05-20 18:13:12 +03:00
|
|
|
<View
|
|
|
|
android:id="@+id/roomDividerView"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="1dp"
|
2019-06-05 16:58:00 +03:00
|
|
|
android:background="?riotx_header_panel_border_mobile"
|
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>
|