From df892ec8d5d43904b7637f05f1855f39dc039b51 Mon Sep 17 00:00:00 2001 From: ahusan Date: Thu, 28 May 2026 17:20:16 +0500 Subject: [PATCH] ui: tokenize card surfaces in dimens.xml and sweep layouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduces a small set of design tokens for card surfaces so the same look is enforced everywhere instead of being hand-tuned per layout: card_radius_lg / card_radius_md — 16dp / 12dp two-tier radius card_elevation_flat / *_raised — 0dp outlined / 1dp subtle raise Sweeps the existing layouts onto these tokens. Two-tier policy: lg → hero/standalone cards (account history header, bml loan, finance deal, otp card, bank selection tiles, security setup options) md → repeating row/summary cards (dashboard summary cards, credentials inset, foreign limit, add-contact sheet) Card-visual representations (item_card_dashboard / _stack / _wallet / _settings_entry) deliberately keep their bespoke radius/elevation so they continue to read as credit cards — the tokens are for content cards only. Tight inset frames inside fragment_bml_qr_pay and fragment_transfer also remain on 4dp/0dp as form details. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../res/layout/fragment_bank_selection.xml | 6 ++-- .../main/res/layout/fragment_credentials.xml | 4 +-- .../main/res/layout/fragment_dashboard.xml | 28 +++++++-------- .../res/layout/fragment_security_setup.xml | 4 +-- .../layout/item_account_history_header.xml | 4 +-- app/src/main/res/layout/item_bml_loan.xml | 4 +-- app/src/main/res/layout/item_finance_deal.xml | 4 +-- .../main/res/layout/item_foreign_limit.xml | 4 +-- app/src/main/res/layout/item_otp_card.xml | 4 +-- app/src/main/res/layout/sheet_add_contact.xml | 4 +-- app/src/main/res/values/dimens.xml | 34 ++++++++++++++++++- 11 files changed, 66 insertions(+), 34 deletions(-) diff --git a/app/src/main/res/layout/fragment_bank_selection.xml b/app/src/main/res/layout/fragment_bank_selection.xml index b842035..9780c82 100644 --- a/app/src/main/res/layout/fragment_bank_selection.xml +++ b/app/src/main/res/layout/fragment_bank_selection.xml @@ -38,7 +38,7 @@ android:layout_marginBottom="16dp" android:clickable="true" android:focusable="true" - app:cardCornerRadius="16dp" + app:cardCornerRadius="@dimen/card_radius_lg" app:strokeWidth="1dp" app:strokeColor="?attr/colorOutline"> @@ -81,7 +81,7 @@ android:layout_marginBottom="16dp" android:clickable="true" android:focusable="true" - app:cardCornerRadius="16dp" + app:cardCornerRadius="@dimen/card_radius_lg" app:strokeWidth="1dp" app:strokeColor="?attr/colorOutline"> @@ -125,7 +125,7 @@ android:layout_marginBottom="16dp" android:clickable="true" android:focusable="true" - app:cardCornerRadius="16dp" + app:cardCornerRadius="@dimen/card_radius_lg" app:strokeWidth="1dp" app:strokeColor="?attr/colorOutline"> diff --git a/app/src/main/res/layout/fragment_credentials.xml b/app/src/main/res/layout/fragment_credentials.xml index 55ef8fe..f5a0a85 100644 --- a/app/src/main/res/layout/fragment_credentials.xml +++ b/app/src/main/res/layout/fragment_credentials.xml @@ -117,8 +117,8 @@ android:layout_marginBottom="8dp" android:visibility="invisible" app:cardBackgroundColor="?attr/colorSecondaryContainer" - app:cardCornerRadius="12dp" - app:cardElevation="0dp"> + app:cardCornerRadius="@dimen/card_radius_md" + app:cardElevation="@dimen/card_elevation_flat"> + app:cardElevation="@dimen/card_elevation_raised" + app:cardCornerRadius="@dimen/card_radius_md"> + app:cardElevation="@dimen/card_elevation_raised" + app:cardCornerRadius="@dimen/card_radius_md"> + app:cardElevation="@dimen/card_elevation_raised" + app:cardCornerRadius="@dimen/card_radius_md"> + app:cardElevation="@dimen/card_elevation_raised" + app:cardCornerRadius="@dimen/card_radius_md"> @@ -238,8 +238,8 @@ android:layout_height="wrap_content" android:layout_weight="1" android:layout_marginStart="8dp" - app:cardElevation="1dp" - app:cardCornerRadius="12dp" + app:cardElevation="@dimen/card_elevation_raised" + app:cardCornerRadius="@dimen/card_radius_md" app:cardBackgroundColor="?attr/colorErrorContainer" android:clickable="true" android:focusable="true" @@ -279,8 +279,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - app:cardElevation="1dp" - app:cardCornerRadius="12dp" + app:cardElevation="@dimen/card_elevation_raised" + app:cardCornerRadius="@dimen/card_radius_md" android:clickable="true" android:focusable="true"> diff --git a/app/src/main/res/layout/fragment_security_setup.xml b/app/src/main/res/layout/fragment_security_setup.xml index 7146e00..2204712 100644 --- a/app/src/main/res/layout/fragment_security_setup.xml +++ b/app/src/main/res/layout/fragment_security_setup.xml @@ -52,7 +52,7 @@ android:layout_marginBottom="12dp" android:clickable="true" android:focusable="true" - app:cardCornerRadius="16dp" + app:cardCornerRadius="@dimen/card_radius_lg" app:strokeWidth="1dp" app:strokeColor="?attr/colorOutline"> diff --git a/app/src/main/res/layout/item_bml_loan.xml b/app/src/main/res/layout/item_bml_loan.xml index 5f40222..2a2b5a3 100644 --- a/app/src/main/res/layout/item_bml_loan.xml +++ b/app/src/main/res/layout/item_bml_loan.xml @@ -5,8 +5,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="12dp" - app:cardCornerRadius="16dp" - app:cardElevation="0dp" + app:cardCornerRadius="@dimen/card_radius_lg" + app:cardElevation="@dimen/card_elevation_flat" app:strokeWidth="1dp" app:strokeColor="?attr/colorOutlineVariant"> diff --git a/app/src/main/res/layout/item_finance_deal.xml b/app/src/main/res/layout/item_finance_deal.xml index 4e33e4d..c5d8b88 100644 --- a/app/src/main/res/layout/item_finance_deal.xml +++ b/app/src/main/res/layout/item_finance_deal.xml @@ -5,8 +5,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="12dp" - app:cardCornerRadius="16dp" - app:cardElevation="0dp" + app:cardCornerRadius="@dimen/card_radius_lg" + app:cardElevation="@dimen/card_elevation_flat" app:strokeWidth="1dp" app:strokeColor="?attr/colorOutlineVariant"> diff --git a/app/src/main/res/layout/item_foreign_limit.xml b/app/src/main/res/layout/item_foreign_limit.xml index 7e76177..fdfd8da 100644 --- a/app/src/main/res/layout/item_foreign_limit.xml +++ b/app/src/main/res/layout/item_foreign_limit.xml @@ -5,8 +5,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - app:cardElevation="1dp" - app:cardCornerRadius="12dp"> + app:cardElevation="@dimen/card_elevation_raised" + app:cardCornerRadius="@dimen/card_radius_md"> + app:cardCornerRadius="@dimen/card_radius_lg" + app:cardElevation="@dimen/card_elevation_raised"> + app:cardCornerRadius="@dimen/card_radius_md" + app:cardElevation="@dimen/card_elevation_raised"> 8dp 176dp 16dp - \ No newline at end of file + + + + + 16dp + 12dp + + + 0dp + 1dp + + + 16dp + 16dp + + + 16dp + 14dp + + + 2dp + 4dp + 8dp + 12dp +