<?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">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?selectableItemBackground"
        android:padding="@dimen/list_padding">

        <com.google.android.material.imageview.ShapeableImageView
            android:id="@+id/avatar"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_alignParentStart="true"
            android:scaleType="centerCrop"
            app:shapeAppearanceOverlay="@style/ShapeAppearance.RoundedCornersLight" />

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/avatar_item_distance"
            android:layout_toEndOf="@+id/avatar">

            <TextView
                android:id="@+id/name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:textAppearance="?textAppearanceTitleMedium"
                tools:text="Prosody IM chatroom" />

            <TextView
                android:id="@+id/language"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignBaseline="@id/name"
                android:layout_marginStart="8sp"
                android:layout_toEndOf="@id/name"
                android:singleLine="true"
                android:textAppearance="?textAppearanceLabelMedium"
                tools:text="EN" />

            <TextView
                android:id="@+id/description"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/name"
                android:maxLines="2"
                android:textAppearance="?textAppearanceBodyMedium"
                tools:text="Prosody XMPP server support and related discussions (i.e. otters)" />

            <TextView
                android:id="@+id/room"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/description"
                android:maxLines="2"
                android:textAppearance="?textAppearanceBodyMedium"
                android:textColor="?colorOnSurfaceVariant"
                tools:text="prosody@conference.prosody.im" />
        </RelativeLayout>

    </RelativeLayout>
</layout>