329 lines
13 KiB
XML
329 lines
13 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<com.google.android.material.card.MaterialCardView
|
|
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"
|
|
android:layout_marginBottom="12dp"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="0dp"
|
|
app:strokeWidth="1dp"
|
|
app:strokeColor="?attr/colorOutlineVariant">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="20dp">
|
|
|
|
<!-- Header row: product name + status chip -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/tvProductName"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceTitleSmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvDealNo"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant"
|
|
android:layout_marginTop="2dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/tvStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingHorizontal="10dp"
|
|
android:paddingVertical="4dp"
|
|
android:background="@drawable/chip_background"
|
|
android:textAppearance="?attr/textAppearanceLabelSmall"
|
|
android:textColor="?attr/colorOnSecondaryContainer" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Total amount -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/financing_total"
|
|
android:textAppearance="?attr/textAppearanceLabelSmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvTotal"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:textColor="?attr/colorOnSurface"
|
|
android:layout_marginStart="8dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Progress bar -->
|
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
android:id="@+id/progressBar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="12dp"
|
|
app:trackCornerRadius="4dp"
|
|
app:trackThickness="8dp" />
|
|
|
|
<!-- Paid / Unpaid row -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal">
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/financing_paid"
|
|
android:textAppearance="?attr/textAppearanceLabelSmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvPaid"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceTitleSmall"
|
|
android:textColor="?attr/colorOnSurface"
|
|
android:layout_marginTop="2dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical"
|
|
android:gravity="end">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/financing_unpaid"
|
|
android:textAppearance="?attr/textAppearanceLabelSmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvUnpaid"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceTitleSmall"
|
|
android:textColor="@color/color_unpaid"
|
|
android:layout_marginTop="2dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Completion estimate -->
|
|
<TextView
|
|
android:id="@+id/tvCompletion"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<!-- Divider -->
|
|
<View
|
|
android:id="@+id/dividerDetails"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:background="?attr/colorOutlineVariant"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginBottom="12dp"
|
|
android:visibility="gone" />
|
|
|
|
<!-- Expanded details -->
|
|
<LinearLayout
|
|
android:id="@+id/detailsGroup"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
|
|
<!-- Deal date -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/financing_deal_date"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvDealDate"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Installment amount -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/financing_installment"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvInstallment"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Number of installments -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/financing_num_installments"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvNumInstallments"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Last paid date -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/financing_last_paid_date"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvLastPaidDate"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Last payment amount -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/financing_last_pay_amount"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvLastPayAmount"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Overdue amount (only shown when > 0) -->
|
|
<LinearLayout
|
|
android:id="@+id/rowOverdue"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/financing_overdue"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="@color/color_unpaid" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvOverdue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="@color/color_unpaid" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|