<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/clItem"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/activatableItemBackground"
        android:foreground="?attr/selectableItemBackground"
        android:padding="6dp">

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvEmail"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="test@example.com"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toStartOf="@+id/ivIntermediate"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:id="@+id/ivIntermediate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/baseline_security_24" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="tvEmail,ivIntermediate" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvSubject"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="CN=marcel@faircode.eu"
            android:textAppearance="@android:style/TextAppearance.Small"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/barrier" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvAfter"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="after"
            android:textAppearance="@android:style/TextAppearance.Small"
            app:layout_constraintEnd_toStartOf="@+id/tvBefore"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/tvSubject" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvBefore"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:gravity="end"
            android:text="before"
            android:textAppearance="@android:style/TextAppearance.Small"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/tvAfter"
            app:layout_constraintTop_toBottomOf="@+id/tvSubject" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvExpired"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_signature_outdated"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textColor="?attr/colorWarning"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvAfter" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>