From c3f777e6154d33d26b2431fa886678edf029dd34 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 2 Apr 2020 10:57:36 -0300 Subject: [wallet] remove abort/cancel buttons --- .../taler/wallet/payment/PromptPaymentFragment.kt | 5 ----- .../wallet/withdraw/PromptWithdrawFragment.kt | 9 ++------ .../wallet/withdraw/ReviewExchangeTosFragment.kt | 8 ++++---- .../main/res/layout-w550dp/payment_bottom_bar.xml | 18 +--------------- .../main/res/layout/fragment_prompt_withdraw.xml | 24 +++++++--------------- .../res/layout/fragment_review_exchange_tos.xml | 14 ++----------- wallet/src/main/res/layout/payment_bottom_bar.xml | 22 +++++--------------- wallet/src/main/res/values/strings.xml | 2 -- 8 files changed, 21 insertions(+), 81 deletions(-) diff --git a/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt b/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt index 2eea59e..7fab695 100644 --- a/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt @@ -71,11 +71,6 @@ class PromptPaymentFragment : Fragment(), ProductImageClickListener { adapter = this@PromptPaymentFragment.adapter layoutManager = LinearLayoutManager(requireContext()) } - - abortButton.setOnClickListener { - paymentManager.abortPay() - findNavController().navigateUp() - } } override fun onDestroy() { diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt index 8fb4cb8..61aed4a 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt @@ -48,12 +48,7 @@ class PromptWithdrawFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - button_cancel_withdraw.setOnClickListener { - withdrawManager.cancelCurrentWithdraw() - findNavController().navigateUp() - } - - button_confirm_withdraw.setOnClickListener { + confirmWithdrawButton.setOnClickListener { val status = withdrawManager.withdrawStatus.value if (status !is WithdrawStatus.ReceivedDetails) throw AssertionError() it.fadeOut() @@ -80,7 +75,7 @@ class PromptWithdrawFragment : Fragment() { withdrawExchangeUrl.text = status.suggestedExchange withdrawExchangeUrl.fadeIn() - button_confirm_withdraw.isEnabled = true + confirmWithdrawButton.isEnabled = true } is WithdrawStatus.Success -> { model.showProgressBar.value = false diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt index eac9e13..d998e5d 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt @@ -50,10 +50,10 @@ class ReviewExchangeTosFragment : Fragment() { acceptTosCheckBox.setOnCheckedChangeListener { _, isChecked -> acceptTosButton.isEnabled = isChecked } - abortTosButton.setOnClickListener { - withdrawManager.cancelCurrentWithdraw() - findNavController().navigateUp() - } +// abortTosButton.setOnClickListener { +// withdrawManager.cancelCurrentWithdraw() +// findNavController().navigateUp() +// } acceptTosButton.setOnClickListener { withdrawManager.acceptCurrentTermsOfService() } diff --git a/wallet/src/main/res/layout-w550dp/payment_bottom_bar.xml b/wallet/src/main/res/layout-w550dp/payment_bottom_bar.xml index d9952f8..b5eabbe 100644 --- a/wallet/src/main/res/layout-w550dp/payment_bottom_bar.xml +++ b/wallet/src/main/res/layout-w550dp/payment_bottom_bar.xml @@ -31,14 +31,13 @@ android:id="@+id/totalLabelView" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="8dp" android:text="@string/payment_label_amount_total" android:visibility="invisible" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/totalView" app:layout_constraintHorizontal_bias="1.0" app:layout_constraintHorizontal_chainStyle="packed" - app:layout_constraintStart_toEndOf="@+id/abortButton" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="@+id/totalView" app:layout_constraintVertical_bias="0.0" tools:visibility="visible" /> @@ -78,19 +77,6 @@ tools:text="@string/payment_fee" tools:visibility="visible" /> -