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))
}
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() {