<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <RelativeLayout
        android:id="@+id/layoutBack"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="@dimen/card_margin"
        android:background="@color/bg_row_background">

        <ImageView
            android:id="@+id/delete_icon"
            android:layout_width="@dimen/ic_delete"
            android:layout_height="@dimen/ic_delete"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="@dimen/padd_10"
            android:src="@drawable/ic_trash"
            android:contentDescription="@string/delete" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginRight="@dimen/padd_10"
            android:layout_toLeftOf="@id/delete_icon"
            android:text="@string/delete"
            android:textColor="#fff"
            android:textSize="13dp" />

    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/layoutFront"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.cardview.widget.CardView
            android:id="@+id/card_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_margin="@dimen/card_margin"
            android:elevation="3dp"
            card_view:cardCornerRadius="@dimen/card_album_radius">


            <androidx.constraintlayout.widget.ConstraintLayout
                android:background="#FFFFFFFF"
                android:layout_margin="3dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:id="@+id/tvTimestamp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    android:textSize="12sp"
                    android:textStyle="italic"

                    android:text="2018-09-11 20:22:32" />

                <TextView
                    android:id="@+id/tvTitle"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toLeftOf="@+id/tvTimestamp"
                    android:layout_marginEnd="4sp"
                    android:textSize="16sp"
                    android:textColor="@color/colorBlack"
                    android:textStyle="bold"
                    android:ellipsize="none"
                    android:maxLines="6"

                    android:text="Message from me"/>

                <TextView
                    android:id="@+id/tvMessage"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@+id/tvTitle"
                    app:layout_constraintRight_toLeftOf="@+id/ivPriority"
                    app:layout_constraintLeft_toLeftOf="parent"
                    android:layout_margin="4sp"
                    android:ellipsize="end"
                    android:maxLines="6"
                    android:scrollHorizontally="false"

                    android:text="asdasd asdasd asdasd a" />

                <ImageView
                    android:id="@+id/ivPriority"
                    android:tint="#BBB"
                    android:visibility="gone"
                    android:layout_width="24dp"
                    android:layout_height="24dp"
                    app:layout_constraintTop_toBottomOf="@+id/tvTimestamp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    android:layout_margin="4sp"
                    android:paddingTop="3dp"
                    android:contentDescription="@string/desc_priority_icon" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnShare"
                    style="@style/Widget.MaterialComponents.Button.Icon"
                    app:cornerRadius="0dp"
                    app:icon="@drawable/ic_share_small"
                    android:layout_width="wrap_content"
                    android:layout_height="25dp"
                    android:layout_marginEnd="8sp"
                    android:insetTop="0dp"
                    android:insetBottom="0dp"
                    android:insetLeft="0dp"
                    android:insetRight="0dp"
                    android:textSize="12sp"
                    card_view:layout_constraintTop_toBottomOf="@id/tvMessage"
                    app:layout_constraintRight_toLeftOf="@id/btnDelete"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:backgroundTint="#03A9F4"
                    android:text="Share" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/btnDelete"
                    style="@style/Widget.MaterialComponents.Button.Icon"
                    app:cornerRadius="0dp"
                    app:icon="@drawable/ic_trash_small"
                    android:layout_width="wrap_content"
                    android:layout_height="25dp"
                    android:insetTop="0dp"
                    android:insetBottom="0dp"
                    android:insetLeft="0dp"
                    android:insetRight="0dp"
                    android:textSize="12sp"
                    card_view:layout_constraintTop_toBottomOf="@id/tvMessage"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:backgroundTint="#F44336"
                    android:text="Delete"/>

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.cardview.widget.CardView>

    </RelativeLayout>

</FrameLayout>