diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/AccountTransactionAdapter.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/AccountTransactionAdapter.kt index 48c855a8..114af3ec 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/AccountTransactionAdapter.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/AccountTransactionAdapter.kt @@ -57,10 +57,10 @@ open class AccountTransactionAdapter selectedTransaction = getItem(viewHolder.adapterPosition) - menu.findItem(R.id.mnitmShowBankTransferDialog)?.let { mnitmShowBankTransferDialog -> + menu.findItem(R.id.mnitmShowTransferMoneyDialog)?.let { mnitmShowTransferMoneyDialog -> val remitteeName = selectedTransaction?.otherPartyName ?: "" - mnitmShowBankTransferDialog.title = view.context.getString(R.string.fragment_home_new_bank_transfer_to, remitteeName) + mnitmShowTransferMoneyDialog.title = view.context.getString(R.string.fragment_home_transfer_money_to, remitteeName) } } diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/BankTransferDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt similarity index 93% rename from fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/BankTransferDialog.kt rename to fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt index c4532b96..65af56e5 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/BankTransferDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt @@ -9,8 +9,8 @@ import android.text.TextWatcher import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import kotlinx.android.synthetic.main.dialog_bank_transfer.* -import kotlinx.android.synthetic.main.dialog_bank_transfer.view.* +import kotlinx.android.synthetic.main.dialog_transfer_money.* +import kotlinx.android.synthetic.main.dialog_transfer_money.view.* import net.dankito.banking.fints4java.android.R import net.dankito.banking.fints4java.android.ui.MainWindowPresenter import net.dankito.banking.fints4java.android.ui.adapter.BankAccountsAdapter @@ -24,10 +24,10 @@ import net.dankito.utils.android.extensions.asActivity import java.math.BigDecimal -open class BankTransferDialog : DialogFragment() { +open class TransferMoneyDialog : DialogFragment() { companion object { - const val DialogTag = "BankTransferDialog" + const val DialogTag = "TransferMoneyDialog" } @@ -59,7 +59,7 @@ open class BankTransferDialog : DialogFragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - val rootView = inflater.inflate(R.layout.dialog_bank_transfer, container, false) + val rootView = inflater.inflate(R.layout.dialog_transfer_money, container, false) setupUI(rootView) @@ -93,7 +93,7 @@ open class BankTransferDialog : DialogFragment() { rootView.btnCancel.setOnClickListener { dismiss() } - rootView.btnDoBankTransfer.setOnClickListener { transferMoney() } + rootView.btnTransferMoney.setOnClickListener { transferMoney() } } protected open fun setPreselectedValues(rootView: View) { @@ -145,11 +145,11 @@ open class BankTransferDialog : DialogFragment() { protected open fun handleTransferMoneyResultOnUiThread(transferData: TransferMoneyData, response: BankingClientResponse) { context?.let { context -> val message = if (response.isSuccessful) { - context.getString(R.string.dialog_bank_transfer_message_transfer_successful, + context.getString(R.string.dialog_transfer_money_message_transfer_successful, String.format("%.02f", transferData.amount), "€", transferData.creditorName) // TODO: where to get currency from? } else { - context.getString(R.string.dialog_bank_transfer_message_transfer_failed, + context.getString(R.string.dialog_transfer_money_message_transfer_failed, String.format("%.02f", transferData.amount), "€", transferData.creditorName, // TODO: where to get currency from? response.errorToShowToUser ) @@ -216,7 +216,7 @@ open class BankTransferDialog : DialogFragment() { && isAmountGreaterZero() && sepaMessageCreator.containsOnlyAllowedCharacters(edtxtUsage.text.toString()) // TODO: show error message for illegal characters - btnDoBankTransfer.isEnabled = requiredDataEntered + btnTransferMoney.isEnabled = requiredDataEntered } protected open fun isAmountGreaterZero(): Boolean { diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt index 6698d202..a44a38c6 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt @@ -17,7 +17,7 @@ import net.dankito.banking.fints4java.android.MainActivity import net.dankito.banking.fints4java.android.R import net.dankito.banking.fints4java.android.ui.MainWindowPresenter import net.dankito.banking.fints4java.android.ui.adapter.AccountTransactionAdapter -import net.dankito.banking.fints4java.android.ui.dialogs.BankTransferDialog +import net.dankito.banking.fints4java.android.ui.dialogs.TransferMoneyDialog import net.dankito.banking.ui.model.AccountTransaction import net.dankito.banking.ui.model.parameters.TransferMoneyData import net.dankito.banking.ui.model.responses.GetTransactionsResponse @@ -119,8 +119,8 @@ class HomeFragment : Fragment() { override fun onContextItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.mnitmShowBankTransferDialog -> { - showBankTransferDialog() + R.id.mnitmShowTransferMoneyDialog -> { + showTransferMoneyDialog() return true } } @@ -169,10 +169,10 @@ class HomeFragment : Fragment() { } - private fun showBankTransferDialog() { + private fun showTransferMoneyDialog() { transactionAdapter.selectedTransaction?.let { selectedTransaction -> (context as? AppCompatActivity)?.let { activity -> - BankTransferDialog().show(activity, presenter, selectedTransaction.bankAccount, mapPreselectedValues(selectedTransaction)) + TransferMoneyDialog().show(activity, presenter, selectedTransaction.bankAccount, mapPreselectedValues(selectedTransaction)) } } } diff --git a/fints4javaAndroidApp/src/main/res/layout/dialog_bank_transfer.xml b/fints4javaAndroidApp/src/main/res/layout/dialog_transfer_money.xml similarity index 69% rename from fints4javaAndroidApp/src/main/res/layout/dialog_bank_transfer.xml rename to fints4javaAndroidApp/src/main/res/layout/dialog_transfer_money.xml index a0f0cf36..3f4aa724 100644 --- a/fints4javaAndroidApp/src/main/res/layout/dialog_bank_transfer.xml +++ b/fints4javaAndroidApp/src/main/res/layout/dialog_transfer_money.xml @@ -3,15 +3,15 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:padding="@dimen/dialog_bank_transfer_padding" + android:padding="@dimen/dialog_transfer_money_padding" > @@ -19,9 +19,9 @@ @@ -38,13 +38,13 @@ @@ -57,13 +57,13 @@ @@ -73,13 +73,13 @@ @@ -90,13 +90,13 @@ @@ -106,13 +106,13 @@ @@ -126,22 +126,22 @@ >