From ebac99eeeb7269484a43ad19692d47ba6344953d Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 17 Nov 2020 01:31:08 +0100 Subject: [PATCH] Fixed bug in Android that DecimalFormatSymbols sometimes uses the wrong Locale and therefore using the wrong decimal separator. Now both, dot and semicolon, can be entered at once but it's way better that way. --- .../dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt | 4 ---- .../src/main/res/layout/dialog_transfer_money.xml | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) 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 9e2a4553..cf979ad3 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 @@ -150,10 +150,6 @@ open class TransferMoneyDialog : DialogFragment() { transferMoneyIfEnterPressed(rootView.edtxtAmount) transferMoneyIfEnterPressed(rootView.edtxtReference) - // fix that even in Locales using ',' as decimal separator entering ',' is not allowed (thanks dstibbe! https://stackoverflow.com/a/34256139) - val decimalSeparator = DecimalFormatSymbols.getInstance().getDecimalSeparator() - rootView.edtxtAmount.keyListener = DigitsKeyListener.getInstance("0123456789$decimalSeparator") - rootView.btnShowRealTimeTransferInfo.setOnClickListener { showRealTimeTransferInfo(rootView.btnShowRealTimeTransferInfo) } setRealTimeTransferControlsVisibility(rootView) diff --git a/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml b/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml index 8dc522fd..d64f6733 100644 --- a/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml +++ b/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml @@ -103,11 +103,14 @@ android:hint="@string/dialog_transfer_money_amount" > +