From b571fc239883f36e851bd2bade77a02532d0429e Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 13 Jun 2020 15:58:50 +0200 Subject: [PATCH] Fixed formatting preselected amount --- .../banking/ui/android/dialogs/TransferMoneyDialog.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt index 93ab0635..fabd10cd 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt @@ -35,12 +35,15 @@ import net.dankito.banking.bankfinder.BankInfo import net.dankito.utils.android.extensions.asActivity import java.math.BigDecimal import java.text.DecimalFormatSymbols +import java.text.NumberFormat import javax.inject.Inject open class TransferMoneyDialog : DialogFragment() { companion object { + val AmountFormat = NumberFormat.getCurrencyInstance() + const val DialogTag = "TransferMoneyDialog" } @@ -199,6 +202,10 @@ open class TransferMoneyDialog : DialogFragment() { rootView.edtxtRemitteeBic.setText(data.creditorBic) + if (data.amount > BigDecimal.ZERO) { + rootView.edtxtAmount.setText(AmountFormat.format(data.amount)) + } + focusEditTextAccordingToPreselectedValues(rootView, data) } }