<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <data>

        <variable
            name="image"
            type="String" />

        <variable
            name="index"
            type="String" />

    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:descendantFocusability="afterDescendants"
        android:focusable="true"
        android:gravity="center">

        <com.shehuan.niv.NiceImageView
            android:id="@+id/cover"
            android:layout_width="@dimen/dp128"
            android:layout_height="@dimen/dp72"
            android:layout_marginStart="@dimen/dp12"
            android:layout_marginTop="@dimen/dp16"
            android:layout_marginEnd="@dimen/dp12"
            android:focusable="true"
            android:scaleType="centerCrop"
            app:border_width="@dimen/dp2"
            app:corner_radius="@dimen/dp12"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:load="@{image}"
            tools:src="@tools:sample/avatars" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:maxLines="1"
            android:text="@{index}"
            android:textColor="#fff"
            android:textSize="@dimen/sp16"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="@id/cover"
            app:layout_constraintStart_toStartOf="@id/cover"
            app:layout_constraintTop_toBottomOf="@id/cover"
            tools:text="@tools:sample/first_names" />

    </androidx.constraintlayout.widget.ConstraintLayout>


</layout>