taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 209e3d8c6021587e05f5c5e2af21a6327d49368b
parent 8b0f536786d48d367edd5eada66aa2c614cf16d2
Author: Iván Ávalos <avalos@disroot.org>
Date:   Tue,  3 Feb 2026 20:53:53 +0100

[wallet] improve design of withdrawal details instructions

Diffstat:
Mwallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt | 29++++++++++++++++++++++++++---
Mwallet/src/main/res/values/strings.xml | 5+++++
2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt b/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt @@ -31,7 +31,9 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import net.taler.common.Amount @@ -98,10 +100,20 @@ fun TransactionWithdrawalComposable( style = MaterialTheme.typography.bodyLarge, ) - ActionButton(tx = t, listener = actionListener) - if (qrCodes.isNotEmpty()) { - Spacer(Modifier.padding(top = 16.dp)) + Text( + modifier = Modifier + .padding(horizontal = 16.dp) + .padding(top = 16.dp, bottom = 8.dp), + style = MaterialTheme.typography.titleMedium, + text = pluralStringResource( + R.plurals.withdraw_qr_instruction, + qrCodes.size, + t.amountEffective.withSpec(spec).toString(), + ), + textAlign = TextAlign.Center, + ) + qrCodes.forEach { spec -> PaytoQrCard( expanded = qrExpandedStates[spec]!!, @@ -119,6 +131,17 @@ fun TransactionWithdrawalComposable( } } + if (qrCodes.isNotEmpty()) Text( + modifier = Modifier + .padding(horizontal = 16.dp) + .padding(top = 16.dp, bottom = 8.dp), + style = MaterialTheme.typography.titleMedium, + text = stringResource(R.string.withdraw_qr_manual), + textAlign = TextAlign.Center, + ) + + ActionButton(tx = t, listener = actionListener) + if (t.amountRaw != t.amountEffective) { TransactionAmountComposable( label = stringResource(R.string.amount_chosen), diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml @@ -374,6 +374,11 @@ GNU Taler is immune to many types of fraud such as credit card data theft, phish <string name="withdraw_manual_step_finish">Finish the wire transfer of %1$s in your banking app or website, then this withdrawal will proceed automatically. Depending on your bank the transfer can take from minutes to two working days, please be patient.</string> <string name="withdraw_manual_step_iban">If you don\'t already have it in your banking favorites list, then copy and paste recipient and IBAN into the recipient/IBAN fields in your banking app or website (and save it as favorite for the next time):</string> <string name="withdraw_manual_step_subject">Copy this code and paste it into the subject/purpose field in your banking app or bank website:</string> + <plurals name="withdraw_qr_instruction"> + <item quantity="one">Scan this QR code with your banking app to withdraw %1$s</item> + <item quantity="other">Scan one of the following QR codes with your banking app to withdraw %1$s</item> + </plurals> + <string name="withdraw_qr_manual">Or follow the instructions to enter the transfer details into your banking app:</string> <string name="withdraw_restrict_age">Restrict usage to age</string> <string name="withdraw_restrict_age_unrestricted">Unrestricted</string> <string name="withdraw_review_terms">You must first accept the payment service\'s terms of service before you can withdraw electronic cash to your wallet.</string>