From 555346d469ce82cd7bf18421102a1162fef225cf Mon Sep 17 00:00:00 2001 From: Angga Dwi Arifandi Date: Tue, 17 Oct 2023 14:49:49 +0200 Subject: [PATCH 1/2] Fix bugs on AndroidManifest.xml and text cleared before being sent --- app/src/main/AndroidManifest.xml | 1 + .../fragment/TransactionInitDialogFragment.kt | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cb5508d..8ac4fbf 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -20,6 +20,7 @@ diff --git a/app/src/main/java/eu/defdev/vulnabank/view/fragment/TransactionInitDialogFragment.kt b/app/src/main/java/eu/defdev/vulnabank/view/fragment/TransactionInitDialogFragment.kt index e650c17..102bf36 100644 --- a/app/src/main/java/eu/defdev/vulnabank/view/fragment/TransactionInitDialogFragment.kt +++ b/app/src/main/java/eu/defdev/vulnabank/view/fragment/TransactionInitDialogFragment.kt @@ -11,7 +11,12 @@ import android.view.ViewGroup import dagger.android.support.DaggerAppCompatDialogFragment import eu.defdev.vulnabank.R import eu.defdev.vulnabank.repository.transaction.TransactionRepository -import kotlinx.android.synthetic.main.fragment_transaction_init.* +import kotlinx.android.synthetic.main.fragment_transaction_init.accountNumber +import kotlinx.android.synthetic.main.fragment_transaction_init.amount +import kotlinx.android.synthetic.main.fragment_transaction_init.cancel +import kotlinx.android.synthetic.main.fragment_transaction_init.comment +import kotlinx.android.synthetic.main.fragment_transaction_init.name +import kotlinx.android.synthetic.main.fragment_transaction_init.ok import javax.inject.Inject class TransactionInitDialogFragment: DaggerAppCompatDialogFragment() { @@ -26,9 +31,10 @@ class TransactionInitDialogFragment: DaggerAppCompatDialogFragment() { super.onViewCreated(view, savedInstanceState) ok.setOnClickListener { - clearTexts() val dataIntent = Intent() - dataIntent.putExtra(INTENT_DATA, getStringContentOfTransaction()) + val msg = getStringContentOfTransaction() + clearTexts() + dataIntent.putExtra(INTENT_DATA, msg) targetFragment?.onActivityResult(targetRequestCode, Activity.RESULT_OK, dataIntent) dismiss() } @@ -51,12 +57,12 @@ class TransactionInitDialogFragment: DaggerAppCompatDialogFragment() { comment.text.clear() } - private fun getStringContentOfTransaction(): String = - "${name.text};" + + private fun getStringContentOfTransaction(): String { + return "${name.text};" + "${accountNumber.text};" + "${amount.text};" + - "${comment.text}" - + "${comment.text}"; + } private fun textChangeListener(action: () -> Unit) = object: TextWatcher { override fun afterTextChanged(p0: Editable?) { manageButtonState() From 6222d63be907562ef7cde51c207ce2e39ef280c2 Mon Sep 17 00:00:00 2001 From: Angga Dwi Arifandi Date: Tue, 17 Oct 2023 14:52:33 +0200 Subject: [PATCH 2/2] add contributor in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 249293c..e927566 100644 --- a/README.md +++ b/README.md @@ -71,4 +71,4 @@ Note, that the main purpose with this app is code review, so building and instal * Implemented by Ferenc Sági (sagifer) * Idea and specification by Zsombor Kovács (huobb0) * Photo by 'Science in HD' used under the Unsplash License; derived work by Ksenia Kotelnikova; original: Seamans Guard, Stagg Field, University of Chicago...Credit: U.S. Department of Energy, Historian's Office - +* Fixed bugs on AndroidManifest.xml and TransactionInitDialogFragment.kt by Angga Arifandi (blackmenthor)