<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ F7cloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2020 Infomaniak Network SA
  ~ SPDX-FileCopyrightText: 2016 Andy Scherzinger <info@andy-scherzinger.de>
  ~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<com.google.android.material.card.MaterialCardView 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:layout_width="match_parent"
    android:layout_height="72dp"
    android:layout_margin="4dp"
    android:orientation="horizontal"
    app:cardBackgroundColor="@color/transparent"
    app:cardElevation="0dp"
    app:strokeWidth="@dimen/zero">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        tools:ignore="UnusedAttribute">

        <FrameLayout
            android:id="@+id/avatar_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_centerVertical="true">

            <ImageView
                android:id="@+id/user_icon"
                android:layout_width="@dimen/small_item_height"
                android:layout_height="@dimen/small_item_height"
                android:layout_gravity="top|start"
                android:layout_marginStart="12dp"
                android:layout_marginTop="1dp"
                android:layout_marginEnd="1dp"
                android:layout_marginBottom="1dp"
                android:contentDescription="@string/avatar"
                android:src="@drawable/account_circle_48dp" />
        </FrameLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:layout_marginEnd="25dp"
            android:layout_toEndOf="@id/avatar_container"
            android:orientation="vertical"
            android:paddingStart="3dp"
            android:paddingEnd="0dp">

            <androidx.emoji2.widget.EmojiTextView
                android:id="@+id/user_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/standard_half_margin"
                android:layout_marginTop="4dp"
                android:layout_marginEnd="@dimen/standard_double_margin"
                android:ellipsize="end"
                android:gravity="start|bottom"
                android:maxLines="1"
                android:textAlignment="viewStart"
                android:textColor="@color/conversation_item_header"
                android:textSize="@dimen/two_line_primary_text_size"
                tools:text="Firstname Lastname" />

            <TextView
                android:id="@+id/account"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/standard_half_margin"
                android:layout_marginEnd="@dimen/standard_double_margin"
                android:layout_marginBottom="4dp"
                android:ellipsize="end"
                android:gravity="start|top"
                android:maxLines="1"
                android:textAlignment="viewStart"
                android:textColor="@color/textColorMaxContrast"
                android:textSize="14sp"
                tools:text="https://server.com/f7cloud" />

        </LinearLayout>

        <ImageView
            android:id="@+id/action_required"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:clickable="true"
            android:contentDescription="@null"
            android:focusable="true"
            android:padding="@dimen/standard_padding"
            android:src="@drawable/accent_circle"
            app:tint="@color/badge_color" />

    </RelativeLayout>
</com.google.android.material.card.MaterialCardView>
