forked from shihaam/thijooree
22806da1b3
Status pills:
* New Widget.App.StatusChip style bundling the 10dp/4dp padding +
chip_background + label-small text used in 3 places (item_bml_loan,
item_finance_deal, item_profile_header). The 3 layouts now apply
the style instead of repeating 4 attributes each.
* Extract the bindCardStatus card-overlay pill background from inline
GradientDrawable code into a real drawable resource
(card_overlay_pill_bg.xml). PayWithCardFragment.bindCardStatus just
sets a background resource now.
Tabular figures (android:fontFeatureSettings="tnum"):
* Applied to amount TextViews on the highest-traffic surfaces —
transactions list, accounts list, card list, dashboard balance /
credit / blocked / overdue / pending finances totals, and the
account history header (available / balance / blocked).
* Digits become same-width, so right-aligned amounts in a column
line up.
Ripple feedback:
* item_finance_deal, item_bml_loan, item_foreign_limit get
android:clickable="true" android:focusable="true" so their
MaterialCardView roots show the M3 ripple when the adapter
attaches a click listener. All three are clickable from code
but were missing the ripple cue.
Empty-state strings:
* Hardcoded "No recent transfers" / "No transactions found" in
fragment_activities, fragment_transfer_history, and
fragment_account_history moved to strings.xml as
activities_empty / transactions_empty, matching the existing
accounts_empty / contacts_empty / financing_empty pattern.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
327 lines
13 KiB
XML
327 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"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
app:cardCornerRadius="@dimen/card_radius_lg"
|
|
app:cardElevation="@dimen/card_elevation_flat"
|
|
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"
|
|
style="@style/Widget.App.StatusChip" />
|
|
|
|
</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>
|