3.8 KiB
Dashboard
The dashboard is the default landing screen when the app opens directly to HomeActivity without an external nav target (HomeActivity.kt:282). In Bottom mode it is also pinned as the leftmost tab.
Fragment — DashboardFragment
A scrollable summary screen that observes HomeViewModel flows (accounts, mibCards, financing, bmlLoanDetails, bmlLimits, hideAmounts) and re-renders on every update. Pull-to-refresh delegates to HomeActivity.triggerRefresh().
Aggregate Balance
Sums availableBalance across all non-credit, non-loan accounts and displays one figure per currency (MVR, USD).
| Row | Filter |
|---|---|
tvMvrBalance / tvUsdBalance |
profileType != "BML_CREDIT" and profileType != "BML_LOAN", grouped by currencyName |
tvMvrCredit / tvUsdCredit |
profileType == "BML_CREDIT" — split per currency, each card hidden when its total is zero |
When hideAmounts is on, every balance is replaced with "MVR ••••••" / "USD ••••••".
Card Stack — DashboardCardAdapter
A horizontal RecyclerView with LinearSnapHelper that paginates BML cards + MIB cards as a single stack:
- BML cards: visible accounts with
profileTypein (BML_PREPAID,BML_CREDIT,BML_DEBIT) ANDstatusDesc == "Active" - MIB cards: filtered by
CardsFragment.isMibCardActive(cardStatus)(i.e.CHST0) - The user's default card (
CredentialStore.getDefaultCardAccountNumber()) is moved to the front - Cards hidden via
getHiddenDashboardCardNumbers()are skipped
Each row renders the masked card number, holder name, status chip and card art (via CardsFragment.cardImageAsset() for MIB, BmlCardParser.cardImageAsset() for BML), plus two action buttons:
| Button | Behaviour |
|---|---|
| QR Pay | Launches QrScannerActivity; on success routes to TransferFragment.newInstanceFromBmlQr(...) for BML / pay.bml URLs, otherwise PayMV pre-fill. Hardcoded to BML — MIB cards show a "not supported" toast |
| NFC Pay | Goes through NfcPaymentUtil.checkAndProceed() and opens CardsFragment in Tap to Pay mode for the chosen card |
Pending Finances
tvPendingFinances shows the sum of MIB outstandingAmount (across deals) plus BML |outstandingAmt| (across loan details). Tapping the card navigates to Financing.
Attention Row
updateAttentionRow() builds a row of small warning cards when there is something the user should notice:
| Card | Visible when |
|---|---|
| Blocked MVR | Any CASA-style account has blockedAmount > 0 (MVR) |
| Blocked USD | Same, for USD |
| Overdue total | financing.overdueAmount + BML loanDetails.overdueAmount is non-zero — tap routes to Financing |
Credit, debit, prepaid, and loan accounts are excluded from the blocked-amount tally — only operating accounts contribute.
Foreign Spend Limits
For each HomeViewModel.bmlLimits entry, the dashboard inflates an ItemForeignLimitBinding. ECOM and General progress bars are always shown; tapping a card expands ATM / POS / Medical rows. See Financing.
Quick Actions
Below the cards section the dashboard exposes two FAB-style buttons (btnQuickAction1, btnQuickAction2) bound from NavCustomization.getQuickActions(prefs). Defaults: Transfer and PayMV QR. Hidden when Bottom navigation is active (refreshQuickActions()).
Toolbar Logo
While the dashboard is the foreground fragment in Bottom mode, the toolbar shows the launcher icon as a logo plus the app name (drawn into a bitmap with a small gap). onPause clears the logo so other fragments are not affected.
← Transfer Flows Next → Cards