<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ F7cloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2022 Tim Krüger <t@timkrueger.me>
  ~ SPDX-FileCopyrightText: 2021 Andy Scherzinger <info@andy-scherzinger.de>
  ~ SPDX-FileCopyrightText: 2017-2018 Mario Danic <mario@lovelyhq.com>
  ~ SPDX-License-Identifier: GPL-3.0-or-later
  ~
  ~ Adapted from https://github.com/stfalcon-studio/ChatKit/blob/master/chatkit/src/main/res/layout/item_dialog.xml
-->
<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:clickable="true"
    android:focusable="true"
    android:background="?attr/selectableItemBackground"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/double_margin_between_elements"
    tools:background="@color/white">

    <ImageView
        android:id="@+id/thumbnail"
        android:layout_width="@dimen/small_item_height"
        android:layout_height="@dimen/small_item_height"
        android:importantForAccessibility="no"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.emoji2.widget.EmojiTextView
        android:id="@+id/conversation_title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/double_margin_between_elements"
        android:layout_marginTop="2dp"
        android:ellipsize="end"
        android:includeFontPadding="false"
        android:maxLines="1"
        android:textColor="@color/conversation_item_header"
        android:textSize="@dimen/two_line_primary_text_size"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/thumbnail"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="Message title goes here" />

    <androidx.emoji2.widget.EmojiTextView
        android:id="@+id/message_excerpt"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        android:ellipsize="end"
        android:gravity="start|top"
        android:lines="1"
        android:singleLine="true"
        android:textColor="@color/textColorMaxContrast"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="@id/conversation_title"
        app:layout_constraintStart_toStartOf="@+id/conversation_title"
        app:layout_constraintTop_toBottomOf="@id/conversation_title"
        tools:text="...this is a message result from unified search, which includes ellipses..." />


</androidx.constraintlayout.widget.ConstraintLayout>
