Fixed formatting preselected amount

This commit is contained in:
dankito 2020-06-13 15:58:50 +02:00
parent 16707aa70a
commit b571fc2398
1 changed files with 7 additions and 0 deletions

View File

@ -35,12 +35,15 @@ import net.dankito.banking.bankfinder.BankInfo
import net.dankito.utils.android.extensions.asActivity import net.dankito.utils.android.extensions.asActivity
import java.math.BigDecimal import java.math.BigDecimal
import java.text.DecimalFormatSymbols import java.text.DecimalFormatSymbols
import java.text.NumberFormat
import javax.inject.Inject import javax.inject.Inject
open class TransferMoneyDialog : DialogFragment() { open class TransferMoneyDialog : DialogFragment() {
companion object { companion object {
val AmountFormat = NumberFormat.getCurrencyInstance()
const val DialogTag = "TransferMoneyDialog" const val DialogTag = "TransferMoneyDialog"
} }
@ -199,6 +202,10 @@ open class TransferMoneyDialog : DialogFragment() {
rootView.edtxtRemitteeBic.setText(data.creditorBic) rootView.edtxtRemitteeBic.setText(data.creditorBic)
if (data.amount > BigDecimal.ZERO) {
rootView.edtxtAmount.setText(AmountFormat.format(data.amount))
}
focusEditTextAccordingToPreselectedValues(rootView, data) focusEditTextAccordingToPreselectedValues(rootView, data)
} }
} }