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

61 lines
2.4 KiB
XML
Raw Normal View History

2019-11-05 20:36:40 +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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/itemUserRoot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2021-06-09 12:51:04 +03:00
android:background="?android:colorBackground"
2019-11-05 20:36:40 +03:00
android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="8dp"
tools:viewBindingIgnore="true">
2019-11-05 20:36:40 +03:00
<ImageView
android:id="@+id/itemUserAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:importantForAccessibility="no"
2019-11-05 20:36:40 +03:00
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@sample/user_round_avatars" />
2019-11-05 20:36:40 +03:00
<TextView
2019-11-05 20:36:40 +03:00
android:id="@+id/itemUserId"
style="@style/Widget.Vector.TextView.Subtitle"
2019-11-05 20:36:40 +03:00
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
android:ellipsize="end"
android:maxLines="1"
2021-06-09 12:51:04 +03:00
android:textColor="?vctr_content_primary"
2019-11-05 20:36:40 +03:00
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/itemUserName"
2019-11-05 20:36:40 +03:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/itemUserAvatar"
2019-11-05 20:36:40 +03:00
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
2021-05-10 23:49:11 +03:00
tools:text="@sample/users.json/data/id" />
2019-11-05 20:36:40 +03:00
<TextView
2019-11-05 20:36:40 +03:00
android:id="@+id/itemUserName"
style="@style/Widget.Vector.TextView.Body"
2019-11-05 20:36:40 +03:00
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:ellipsize="end"
android:maxLines="1"
2021-06-09 12:51:04 +03:00
android:textColor="?vctr_content_secondary"
2019-11-05 20:36:40 +03:00
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/itemUserAvatar"
app:layout_constraintTop_toBottomOf="@id/itemUserId"
2021-05-10 23:49:11 +03:00
tools:text="@sample/users.json/data/displayName"
2019-11-05 20:36:40 +03:00
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>