<?xml version="1.0" encoding="utf-8"?>
<im.vector.app.core.platform.CheckableConstraintLayout 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/root"
    android:layout_width="match_parent"
    android:layout_height="65dp"
    android:background="@drawable/bg_space_item"
    android:clickable="true"
    android:focusable="true"
    android:foreground="?attr/selectableItemBackground"
    tools:viewBindingIgnore="true">

    <ImageView
        android:id="@+id/avatar"
        android:layout_width="42dp"
        android:layout_height="42dp"
        android:layout_gravity="center"
        android:layout_marginStart="@dimen/layout_horizontal_margin"
        android:duplicateParentState="true"
        android:importantForAccessibility="no"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:src="@sample/space_avatars" />

    <TextView
        android:id="@+id/name"
        style="@style/Widget.Vector.TextView.Subtitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/layout_horizontal_margin"
        android:ellipsize="end"
        android:maxLines="1"
        android:textColor="?vctr_content_primary"
        android:textStyle="bold"
        app:layout_constraintVertical_chainStyle="packed"
        app:layout_constraintBottom_toTopOf="@id/invited_by"
        app:layout_constraintEnd_toStartOf="@id/unread_counter"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="Element Corp" />

    <TextView
        android:id="@+id/invited_by"
        style="@style/Widget.Vector.TextView.Body"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/layout_horizontal_margin"
        android:ellipsize="end"
        android:layout_marginTop="2dp"
        android:maxLines="1"
        android:textColor="?vctr_content_secondary"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/unread_counter"
        app:layout_constraintStart_toEndOf="@id/avatar"
        app:layout_constraintTop_toBottomOf="@id/name"
        tools:text="Invited by John Smith" />

    <im.vector.app.features.home.room.list.UnreadCounterBadgeView
        android:id="@+id/notification_badge"
        style="@style/Widget.Vector.TextView.Micro"
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:layout_marginEnd="52dp"
        android:gravity="center"
        android:minWidth="16dp"
        android:minHeight="16dp"
        android:paddingStart="4dp"
        android:paddingEnd="4dp"
        android:textColor="?colorOnError"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:background="@drawable/bg_unread_highlight"
        tools:text="!"
        tools:visibility="visible" />

</im.vector.app.core.platform.CheckableConstraintLayout>
