element-android/vector/src/main/res/layout/item_room.xml

107 lines
4.2 KiB
XML
Raw Normal View History

2018-10-19 15:26:38 +03:00
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
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"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
2018-10-30 13:47:05 +03:00
android:clickable="true"
android:focusable="true"
2019-03-18 16:56:08 +03:00
android:paddingStart="8dp"
2019-05-20 18:13:12 +03:00
android:paddingLeft="8dp">
2018-10-29 19:20:08 +03:00
<ImageView
android:id="@+id/roomAvatarImageView"
2019-05-17 11:19:19 +03:00
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
2019-05-20 18:13:12 +03:00
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<TextView
android:id="@+id/roomNameView"
2019-05-17 18:07:02 +03:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
2019-05-20 18:13:12 +03:00
android:layout_marginLeft="16dp"
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"
android:duplicateParentState="true"
2019-05-17 18:07:02 +03:00
android:ellipsize="end"
android:maxLines="1"
2019-05-17 11:19:19 +03:00
android:textColor="@color/black_87"
android:textSize="14sp"
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"
app:layout_constraintStart_toEndOf="@id/roomAvatarImageView"
2019-05-20 18:13:12 +03:00
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />
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"
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-05-17 11:19:19 +03:00
android:textColor="@color/black_38"
android:textSize="12sp"
2019-05-20 18:13:12 +03:00
app:layout_constraintBottom_toBottomOf="@+id/roomNameView"
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"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
2019-05-17 18:07:02 +03:00
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/black_38"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/roomNameView"
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
tools:text="@tools:sample/lorem/random" />
2019-05-20 18:13:12 +03:00
<View
android:id="@+id/roomDividerView"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="#1e000000"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@+id/roomLastEventView"
app:layout_constraintStart_toStartOf="@+id/roomNameView" />
2019-05-17 18:07:02 +03:00
</androidx.constraintlayout.widget.ConstraintLayout>