<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <View
        android:id="@+id/vSeparatorAddress"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:background="?attr/colorSeparator"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <eu.faircode.email.ViewImageHint
        android:id="@+id/ivPlain"
        android:layout_width="21dp"
        android:layout_height="21dp"
        android:layout_marginStart="6dp"
        android:contentDescription="@string/title_legend_plain_only"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/ibExpanderAddress"
        app:srcCompat="@drawable/baseline_notes_24" />

    <eu.faircode.email.ViewImageHint
        android:id="@+id/ivReceipt"
        android:layout_width="21dp"
        android:layout_height="21dp"
        android:layout_marginStart="6dp"
        android:contentDescription="@string/title_legend_receipt"
        app:layout_constraintStart_toEndOf="@id/ivPlain"
        app:layout_constraintTop_toBottomOf="@id/ibExpanderAddress"
        app:srcCompat="@drawable/baseline_playlist_add_check_24" />

    <eu.faircode.email.ViewImageHint
        android:id="@+id/ivBrowsed"
        android:layout_width="21dp"
        android:layout_height="21dp"
        android:layout_marginStart="6dp"
        android:contentDescription="@string/title_legend_browsed"
        app:layout_constraintStart_toEndOf="@id/ivReceipt"
        app:layout_constraintTop_toBottomOf="@id/ibExpanderAddress"
        app:srcCompat="@drawable/baseline_playlist_add_24" />

    <ImageButton
        android:id="@+id/ibExpanderAddress"
        android:layout_width="0dp"
        android:layout_height="24dp"
        android:background="?android:attr/selectableItemBackground"
        android:contentDescription="@string/title_legend_expander"
        android:visibility="visible"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/vSeparatorAddress"
        app:srcCompat="@drawable/expander" />

    <ImageButton
        android:id="@+id/ibSearchContact"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="12dp"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        android:contentDescription="@string/title_legend_similar"
        android:tooltipText="@string/title_legend_similar"
        app:layout_constraintEnd_toStartOf="@+id/ibNotifyContact"
        app:layout_constraintTop_toBottomOf="@id/ibExpanderAddress"
        app:srcCompat="@drawable/baseline_search_24" />

    <ImageButton
        android:id="@+id/ibNotifyContact"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="12dp"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        android:contentDescription="@string/title_legend_notify"
        android:tooltipText="@string/title_legend_notify"
        app:layout_constraintEnd_toStartOf="@+id/ibPinContact"
        app:layout_constraintTop_toBottomOf="@id/ibExpanderAddress"
        app:srcCompat="@drawable/baseline_notifications_24" />

    <ImageButton
        android:id="@+id/ibPinContact"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="12dp"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        android:contentDescription="@string/title_legend_notify"
        android:tooltipText="@string/title_pin"
        app:layout_constraintEnd_toStartOf="@+id/ibAddContact"
        app:layout_constraintTop_toBottomOf="@id/ibExpanderAddress"
        app:srcCompat="@drawable/baseline_person_pin_circle_24" />

    <ImageButton
        android:id="@+id/ibAddContact"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="12dp"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        android:contentDescription="@string/title_legend_contacts"
        android:tooltipText="@string/title_legend_contacts"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/ibExpanderAddress"
        app:srcCompat="@drawable/baseline_import_contacts_24" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/barrier_action"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="bottom"
        app:constraint_referenced_ids="ibSearchContact,ibNotifyContact,ibPinContact,ibAddContact" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvSubmitterTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvSubmitter"
        android:text="@string/title_submitter"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/barrier_action" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvSubmitter"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Submitter"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/barrier_action" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvDeliveredToTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvFromEx"
        android:text="@string/title_delivered_to"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvSubmitter" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvDeliveredTo"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Delivered to"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvSubmitter" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvFromExTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvFromEx"
        android:text="@string/title_from"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvDeliveredTo" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvFromEx"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="From"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvDeliveredTo" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvToTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvTo"
        android:text="@string/title_to"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvFromEx" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvTo"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="To"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvFromEx" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvReplyToTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvReplyTo"
        android:text="@string/title_reply_to"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvTo" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvReplyTo"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Reply to"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvTo" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvCcTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvCc"
        android:text="@string/title_cc"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvReplyTo" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvCc"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Cc"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvReplyTo" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvBccTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvBcc"
        android:text="@string/title_bcc"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvCc" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvBcc"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Bcc"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvCc" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvIdentityTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvIdentity"
        android:text="@string/title_via_identity"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvBcc" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvIdentity"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="user@example.org"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvBcc" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvSentTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvSent"
        android:text="@string/title_sent"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvIdentity" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvSent"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="12:34:56"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvIdentity" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvReceivedTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvReceived"
        android:text="@string/title_received"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvSent" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvReceived"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="12:34:56"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvSent" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvSizeExTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvSizeEx"
        android:text="@string/title_size"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvReceived" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvSizeEx"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="123 KB"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvReceived" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvLanguageTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:labelFor="@+id/tvSizeEx"
        android:text="@string/title_language"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvSizeEx" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvLanguage"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="English"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
        app:layout_constraintTop_toBottomOf="@id/tvSizeEx" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/barrier_addresses"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="end"
        app:constraint_referenced_ids="
            tvSubmitterTitle,tvDeliveredToTitle,
            tvFromExTitle,tvToTitle,tvReplyToTitle,
            tvCcTitle,tvBccTitle,
            tvIdentityTitle,
            tvSentTitle,tvReceivedTitle,
            tvSizeExTitle, tvLanguageTitle" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvSubjectEx"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Subject"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvLanguage" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvFlags"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Flags"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvSubjectEx" />

    <eu.faircode.email.FixedTextView
        android:id="@+id/tvKeywordsEx"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:text="Keywords"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textIsSelectable="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/tvFlags" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/grpAddresses"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:constraint_referenced_ids="vSeparatorAddress,ibExpanderAddress" />
</androidx.constraintlayout.widget.ConstraintLayout>
