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

72 lines
2.7 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-05-17 11:19:19 +03:00
android:paddingBottom="16dp"
android:paddingTop="16dp"
2019-03-18 16:56:08 +03:00
android:paddingStart="8dp"
android:paddingLeft="8dp"
2019-03-18 16:56:08 +03:00
android:paddingEnd="16dp"
android:paddingRight="16dp">
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"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<TextView
android:id="@+id/roomNameView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:duplicateParentState="true"
2019-05-17 11:19:19 +03:00
android:textColor="@color/black_87"
android:textSize="14sp"
2019-05-17 11:19:19 +03:00
app:layout_constraintEnd_toStartOf="@+id/roomLastEventTimeView"
app:layout_constraintStart_toEndOf="@id/roomAvatarImageView"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />
2018-10-30 13:47:05 +03:00
2019-05-17 11:19:19 +03:00
<TextView
android:id="@+id/roomLastEventView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/black_38"
android:textSize="14sp"
android:maxLines="2"
android:ellipsize="end"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/roomNameView"
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
tools:text="@tools:sample/lorem/random" />
<TextView
android:id="@+id/roomLastEventTimeView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-05-17 11:19:19 +03:00
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:textColor="@color/black_38"
android:textSize="12sp"
2019-05-17 11:19:19 +03:00
app:layout_constraintBaseline_toBaselineOf="@id/messageMemberNameView"
app:layout_constraintEnd_toEndOf="parent"
2019-05-17 11:19:19 +03:00
app:layout_constraintStart_toEndOf="@id/messageMemberNameView"
tools:text="@tools:sample/date/hhmm" />
</androidx.constraintlayout.widget.ConstraintLayout>