<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2022 Proton AG
  ~
  ~ This file is part of Proton Mail.
  ~
  ~ Proton Mail is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Proton Mail is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Proton Mail. If not, see https://www.gnu.org/licenses/.
  -->
<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:layout_width="match_parent"
    android:layout_height="@dimen/contact_list_item_height"
    android:background="?selectableItemBackground"
    android:descendantFocusability="blocksDescendants">

    <ch.protonmail.android.views.ListItemThumbnail
        android:id="@+id/mailAvatar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/padding_l"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/padding_l"
        android:layout_marginTop="@dimen/padding_l"
        android:ellipsize="end"
        android:gravity="center_vertical"
        android:lines="1"
        android:textColor="@color/text_norm"
        android:textSize="@dimen/h4"
        app:layout_constraintBottom_toTopOf="@+id/email"
        app:layout_constraintEnd_toStartOf="@+id/check"
        app:layout_constraintStart_toEndOf="@+id/mailAvatar"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="@tools:sample/lorem/random" />

    <TextView
        android:id="@+id/email"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/padding_l"
        android:layout_marginTop="@dimen/padding_m"
        android:ellipsize="end"
        android:gravity="center_vertical"
        android:lines="1"
        android:textColor="@color/text_weak"
        android:textSize="@dimen/h6"
        app:layout_constraintEnd_toStartOf="@+id/check"
        app:layout_constraintStart_toEndOf="@+id/mailAvatar"
        app:layout_constraintTop_toBottomOf="@+id/name"
        tools:text="@tools:sample/full_names" />

    <com.google.android.material.checkbox.MaterialCheckBox
        android:id="@+id/check"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:clickable="false"
        android:focusable="false"
        android:padding="@dimen/padding_m"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/delete"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:background="?selectableItemBackground"
        android:contentDescription="@string/close"
        android:gravity="center"
        android:padding="@dimen/padding_l"
        app:srcCompat="@drawable/ic_proton_cross"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:visibility="visible" />

</androidx.constraintlayout.widget.ConstraintLayout>
