<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bgColor" >

    <androidx.cardview.widget.CardView
        android:id="@+id/summaryContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        app:cardCornerRadius="10dp"
        app:contentPadding="10dp"
        app:cardElevation="@dimen/card_shadow"
        android:layout_margin="@dimen/card_margin"
        app:cardBackgroundColor="@color/fontColorWhite">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/summary_kunjungan"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textStyle="bold"
                    android:textColor="@color/colorMC"
                    android:paddingBottom="10dp"
                    android:layout_marginLeft="2dp"/>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="-"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:paddingBottom="10dp"
                    android:textStyle="bold"
                    android:textColor="@color/colorMC"/>
                <TextView
                    android:id="@+id/txtDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/dummy_tanggal"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:paddingBottom="10dp"
                    android:textStyle="bold"
                    android:textColor="@color/colorMC"/>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                    <TextView
                        android:id="@+id/lblCollected"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="0.5"
                        android:paddingBottom="5dp"
                        android:paddingTop="5dp"
                        android:text="@string/label_total_collected"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:drawableLeft="@drawable/ic_cash_color"
                        android:drawablePadding="5dp"/>
                    <View
                        android:layout_width="1dp"
                        android:layout_height="match_parent"
                        android:layout_centerHorizontal="true"
                        android:background="@color/timelineLine" />
                    <TextView
                        android:id="@+id/txtCollected"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="0.5"
                        android:paddingBottom="5dp"
                        android:paddingTop="5dp"
                        android:text="@string/dummy_total_collected"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:layout_gravity="end"
                        android:textAlignment="textEnd"/>
                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                    <TextView
                        android:id="@+id/lblPaid"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="0.5"
                        android:text="@string/label_total_paid"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:drawableLeft="@drawable/ic_cash_color"
                        android:drawablePadding="5dp"/>
                    <View
                        android:layout_width="1dp"
                        android:layout_height="match_parent"
                        android:layout_centerHorizontal="true"
                        android:background="@color/timelineLine" />
                    <TextView
                        android:id="@+id/txtPaid"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="0.5"
                        android:paddingBottom="5dp"
                        android:text="@string/dummy_total_paid"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:layout_gravity="end"
                        android:textAlignment="textEnd"/>
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </androidx.cardview.widget.CardView>

    <androidx.cardview.widget.CardView
        android:id="@+id/detailContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardCornerRadius="10dp"
        app:contentPadding="7dp"
        app:cardElevation="@dimen/card_shadow"
        android:layout_margin="@dimen/card_margin"
        app:cardBackgroundColor="@color/fontColorWhite">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1">
            <HorizontalScrollView
                android:id="@+id/horizontalScrollView1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:fillViewport="true">
                <TableLayout
                    android:id="@+id/tableSummary"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <TableRow
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">

                        <TextView
                            android:gravity="center_horizontal"
                            android:text="@string/label_agreement_no"
                            android:textAppearance="?android:attr/textAppearanceSmall"
                            android:paddingTop="5dp"
                            android:paddingBottom="5dp" />
                        <View
                            android:layout_width="1dp"
                            android:layout_height="match_parent"
                            android:background="@color/timelineLine" />
                        <TextView
                            android:gravity="center_horizontal"
                            android:text="@string/label_status"
                            android:textAppearance="?android:attr/textAppearanceSmall"
                            android:paddingTop="5dp"
                            android:paddingBottom="5dp" />
                        <View
                            android:layout_width="1dp"
                            android:layout_height="match_parent"
                            android:background="@color/timelineLine" />
                        <TextView
                            android:gravity="center_horizontal"
                            android:text="@string/label_result"
                            android:textAppearance="?android:attr/textAppearanceSmall"
                            android:paddingTop="5dp"
                            android:paddingBottom="5dp" />
                    </TableRow>
                    <TableRow>
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="1dp"
                            android:background="@color/timelineLine"/>
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="1dp"
                            android:background="@color/timelineLine"/>
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="1dp"
                            android:background="@color/timelineLine"/>
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="1dp"
                            android:background="@color/timelineLine"/>
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="1dp"
                            android:background="@color/timelineLine"/>

                    </TableRow>
                    <TableRow
                        android:layout_width="match_parent"
                        android:layout_height="5dp">
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="5dp" />
                        <View
                            android:layout_width="1dp"
                            android:layout_height="match_parent"
                            android:background="@color/timelineLine" />
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="5dp" />
                        <View
                            android:layout_width="1dp"
                            android:layout_height="match_parent"
                            android:background="@color/timelineLine" />
                        <View
                            android:layout_width="match_parent"
                            android:layout_height="5dp" />
                    </TableRow>
                </TableLayout>
            </HorizontalScrollView>
        </ScrollView>
    </androidx.cardview.widget.CardView>
</LinearLayout>