From 6f510fdaefd1214589bea2a0588b4a6706d2699b Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 2 Sep 2020 17:41:50 +0200 Subject: [PATCH] Implemented focusing edtxtAmount when a Remittee got selected --- .../banking/ui/android/dialogs/TransferMoneyDialog.kt | 10 ++++++---- 1 file changed, 6 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 12b132cc..ffd43cbf 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 @@ -227,13 +227,13 @@ open class TransferMoneyDialog : DialogFragment() { edtxtAmount.setText(AmountFormat.format(data.amount)) } - focusEditTextAccordingToPreselectedValues(data) + focusEditTextAccordingToPreselectedValues() } } - protected open fun focusEditTextAccordingToPreselectedValues(data: TransferMoneyData) { - if (data.creditorName.trim().isNotEmpty()) { - if (data.creditorIban.trim().isNotEmpty()) { + protected open fun focusEditTextAccordingToPreselectedValues() { + if (edtxtRemitteeName.text.toString().trim().isNotEmpty()) { + if (edtxtRemitteeIban.text.toString().trim().isNotEmpty()) { edtxtAmount.requestFocus() } else { @@ -247,6 +247,8 @@ open class TransferMoneyDialog : DialogFragment() { edtxtRemitteeName.setText(item.name) edtxtRemitteeIban.setText(item.iban) remitteeBic = item.bic + + focusEditTextAccordingToPreselectedValues() } protected open fun transferMoney() {