<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
    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="wrap_content"
    android:layout_gravity="center"
    app:cardElevation="@dimen/card_elevation"
    app:cardCornerRadius="@dimen/card_radius"
    android:layout_margin="@dimen/card_margin">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/rootView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?android:attr/selectableItemBackground">

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/firstVerticalGuideline"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="0.05"/>

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/secondVerticalGuideline"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="0.45"/>

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/thirdVerticalGuideline"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="0.55"/>

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/fourthVerticalGuideline"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="0.95"/>

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/centeredVerticalGuideline"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            app:layout_constraintGuide_percent="0.50"/>

        <View
            android:id="@+id/vPaymentDirection"
            android:layout_width="8dp"
            android:layout_height="0dp"
            android:background="@color/colorReceive"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"/>

        <TextView
            android:id="@+id/tvFrom"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:maxLines="1"
            tools:text="denzel-washington"
            android:textAppearance="@style/TextAppearance.Bitsy.Body2"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/secondVerticalGuideline"/>

        <ImageView
            android:id="@+id/ivDirectionArrow"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:src="@drawable/ic_arrow_receive"
            app:layout_constraintTop_toTopOf="@id/tvFrom"
            app:layout_constraintBottom_toBottomOf="@id/tvFrom"
            app:layout_constraintStart_toEndOf="@id/secondVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/thirdVerticalGuideline"
            tools:ignore="ContentDescription" />

        <TextView
            android:id="@+id/tvTo"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:maxLines="1"
            tools:text="joes-grocery-13"
            android:textAppearance="@style/TextAppearance.Bitsy.Body2"
            android:textAlignment="textEnd"
            app:layout_constraintTop_toTopOf="@id/tvFrom"
            app:layout_constraintStart_toEndOf="@id/thirdVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline"/>

        <View
            android:id="@+id/vSeparator"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:layout_marginTop="12dp"
            android:background="@color/superLightGray"
            app:layout_constraintTop_toBottomOf="@id/tvFrom"
            app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline" />

        <LinearLayout
            android:id="@+id/llMemo"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:visibility="gone"
            app:layout_constraintTop_toBottomOf="@id/vSeparator"
            app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline">

            <TextView
                android:id="@+id/tvMemo"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:maxLines="2"
                android:textAppearance="@android:style/TextAppearance.Material.Caption"
                tools:text="Here is a memo if exists and can span up to 2 lines, if it get lager we will have problems with the rendering"/>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="12dp"
                android:background="@color/superLightGray"/>

        </LinearLayout>

        <TextView
            android:id="@+id/tvDate"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:maxLines="1"
            tools:text="02 Oct"
            android:textStyle="bold"
            android:textAppearance="@style/TextAppearance.Bitsy.Body1"
            app:layout_constraintTop_toBottomOf="@id/llMemo"
            app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/>

        <TextView
            android:id="@+id/tvTime"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:maxLines="1"
            tools:text="15:01:18 CET"
            android:textAppearance="@style/TextAppearance.Bitsy.Body2"
            android:textColor="@color/gray"
            app:layout_constraintTop_toBottomOf="@+id/tvDate"
            app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/>

        <TextView
            android:id="@+id/tvCryptoAmount"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:maxLines="1"
            tools:text="1234567.1234 BTS"
            android:textAppearance="@style/TextAppearance.Bitsy.Body1"
            android:textStyle="bold"
            android:textAlignment="textEnd"
            app:layout_constraintTop_toTopOf="@id/tvDate"
            app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline" />

        <TextView
            android:id="@+id/tvFiatEquivalent"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:maxLines="1"
            tools:text="4119.75 $"
            android:textAppearance="@style/TextAppearance.Bitsy.Body2"
            android:textColor="@color/gray"
            android:textAlignment="textEnd"
            app:layout_constraintTop_toBottomOf="@+id/tvCryptoAmount"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
            app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline"/>

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>