Implemented focusing edtxtAmount when a Remittee got selected

This commit is contained in:
dankito 2020-09-02 17:41:50 +02:00
parent 771ec1b7f1
commit 6f510fdaef
1 changed files with 6 additions and 4 deletions

View File

@ -227,13 +227,13 @@ open class TransferMoneyDialog : DialogFragment() {
edtxtAmount.setText(AmountFormat.format(data.amount)) edtxtAmount.setText(AmountFormat.format(data.amount))
} }
focusEditTextAccordingToPreselectedValues(data) focusEditTextAccordingToPreselectedValues()
} }
} }
protected open fun focusEditTextAccordingToPreselectedValues(data: TransferMoneyData) { protected open fun focusEditTextAccordingToPreselectedValues() {
if (data.creditorName.trim().isNotEmpty()) { if (edtxtRemitteeName.text.toString().trim().isNotEmpty()) {
if (data.creditorIban.trim().isNotEmpty()) { if (edtxtRemitteeIban.text.toString().trim().isNotEmpty()) {
edtxtAmount.requestFocus() edtxtAmount.requestFocus()
} }
else { else {
@ -247,6 +247,8 @@ open class TransferMoneyDialog : DialogFragment() {
edtxtRemitteeName.setText(item.name) edtxtRemitteeName.setText(item.name)
edtxtRemitteeIban.setText(item.iban) edtxtRemitteeIban.setText(item.iban)
remitteeBic = item.bic remitteeBic = item.bic
focusEditTextAccordingToPreselectedValues()
} }
protected open fun transferMoney() { protected open fun transferMoney() {