<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>
        <variable
            name="person"
            type="com.mrozon.core_api.entity.Person" />
    </data>

    <androidx.cardview.widget.CardView
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:id="@+id/cvPerson"
        android:layout_gravity="center"
        android:layout_margin="@dimen/card_margin"
        app:cardCornerRadius="5dp"
        app:elevation="@dimen/cardview_elevation">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:id="@+id/ivGender"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:alpha="0.75"
                android:contentDescription="@string/ivGender"
                app:gender="@{person}"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:srcCompat="@drawable/ic_logo_24" />

            <TextView
                android:id="@+id/person_name"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_centerVertical="true"
                android:layout_marginLeft="16dp"
                android:layout_marginRight="16dp"
                android:layout_toEndOf="@id/ivGender"
                android:paddingTop="16dp"
                app:name_with_age="@{person}"
                android:textAppearance="@style/TextAppearance.AppCompat.Large"
                android:textColor="#000000"
                android:textSize="20sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toEndOf="@+id/ivGender"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_chainStyle="packed"
                tools:text="Полезный человек" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.cardview.widget.CardView>

</layout>