<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:id="@+id/parent_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <androidx.cardview.widget.CardView
        android:id="@+id/cardView"
        card_view:cardCornerRadius="2dp"
        card_view:contentPadding="10dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp">

        <RelativeLayout

            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/txtTitle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignLeft="@+id/txtDesc"
                android:layout_toLeftOf="@+id/txtTime"
                android:gravity="center_vertical"
                android:minHeight="?android:attr/listPreferredItemHeightSmall"
                android:text="@string/title"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/txtDesc"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/txtTitle"
                android:text="@string/description"
                android:textAppearance="?android:attr/textAppearanceSmall" />


            <ImageView
                android:id="@+id/timelineImage"
                android:layout_width="fill_parent"
                android:layout_height="96dp"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/txtDesc"
                android:scaleType="centerCrop"
                android:src="@drawable/img_notavailable" />

            <TextView
                android:id="@+id/txtTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignBaseline="@+id/txtTitle"
                android:layout_alignBottom="@+id/txtTitle"
                android:layout_alignParentRight="true"
                android:text="@string/defaultTime"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textSize="10dp" />

            <RelativeLayout
                android:id="@+id/buttonLayout"
                android:layout_width="30dp"
                android:layout_height="32dp"
                android:layout_alignParentRight="true"
                android:layout_below="@+id/timelineImage"
                android:background="#eaeaea"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true">

                <TextView
                    android:id="@+id/txtComment"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:drawableLeft="@drawable/ic_comment"
                    android:text="@string/comment"
                    android:textAppearance="?android:attr/textAppearanceSmall" />

            </RelativeLayout>
        </RelativeLayout>
    </androidx.cardview.widget.CardView>
</RelativeLayout>