[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 02/04: [wallet] remove abort/cancel buttons
From: |
gnunet |
Subject: |
[taler-taler-android] 02/04: [wallet] remove abort/cancel buttons |
Date: |
Thu, 02 Apr 2020 18:59:53 +0200 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a commit to branch master
in repository taler-android.
commit c3f777e6154d33d26b2431fa886678edf029dd34
Author: Torsten Grote <address@hidden>
AuthorDate: Thu Apr 2 10:57:36 2020 -0300
[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" />
- <Button
- android:id="@+id/abortButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:backgroundTint="@color/red"
- android:text="@string/payment_button_abort"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/confirmButton"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-
<Button
android:id="@+id/confirmButton"
android:layout_width="wrap_content"
@@ -101,8 +87,6 @@
android:text="@string/payment_button_confirm"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/abortButton"
app:layout_constraintTop_toTopOf="parent"
tools:enabled="true" />
diff --git a/wallet/src/main/res/layout/fragment_prompt_withdraw.xml
b/wallet/src/main/res/layout/fragment_prompt_withdraw.xml
index 0d507c8..fe64bad 100644
--- a/wallet/src/main/res/layout/fragment_prompt_withdraw.xml
+++ b/wallet/src/main/res/layout/fragment_prompt_withdraw.xml
@@ -131,18 +131,7 @@
android:padding="8dp">
<Button
- android:id="@+id/button_cancel_withdraw"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:backgroundTint="@color/red"
- android:text="@string/button_cancel"
- app:layout_constraintBottom_toBottomOf="parent"
-
app:layout_constraintEnd_toStartOf="@+id/button_confirm_withdraw"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintStart_toStartOf="parent" />
-
- <Button
- android:id="@+id/button_confirm_withdraw"
+ android:id="@+id/confirmWithdrawButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/green"
@@ -150,7 +139,8 @@
android:text="@string/withdraw_button_confirm"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
-
app:layout_constraintStart_toEndOf="@+id/button_cancel_withdraw" />
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintStart_toStartOf="parent" />
<ProgressBar
android:id="@+id/confirmProgressBar"
@@ -158,10 +148,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
-
app:layout_constraintBottom_toBottomOf="@+id/button_confirm_withdraw"
- app:layout_constraintEnd_toEndOf="@+id/button_confirm_withdraw"
-
app:layout_constraintStart_toStartOf="@+id/button_confirm_withdraw"
- app:layout_constraintTop_toTopOf="@+id/button_confirm_withdraw"
+
app:layout_constraintBottom_toBottomOf="@+id/confirmWithdrawButton"
+ app:layout_constraintEnd_toEndOf="@+id/confirmWithdrawButton"
+
app:layout_constraintStart_toStartOf="@+id/confirmWithdrawButton"
+ app:layout_constraintTop_toTopOf="@+id/confirmWithdrawButton"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/wallet/src/main/res/layout/fragment_review_exchange_tos.xml
b/wallet/src/main/res/layout/fragment_review_exchange_tos.xml
index 69f5c7c..9c7d7a1 100644
--- a/wallet/src/main/res/layout/fragment_review_exchange_tos.xml
+++ b/wallet/src/main/res/layout/fragment_review_exchange_tos.xml
@@ -76,17 +76,6 @@
app:layout_constraintStart_toStartOf="parent"
tools:visibility="visible" />
- <Button
- android:id="@+id/abortTosButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:backgroundTint="@color/red"
- android:text="@string/button_cancel"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/acceptTosButton"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintStart_toStartOf="parent" />
-
<Button
android:id="@+id/acceptTosButton"
android:layout_width="wrap_content"
@@ -96,7 +85,8 @@
android:text="@string/exchange_tos_button_continue"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@+id/abortTosButton" />
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/wallet/src/main/res/layout/payment_bottom_bar.xml
b/wallet/src/main/res/layout/payment_bottom_bar.xml
index c17068e..a19ac4e 100644
--- a/wallet/src/main/res/layout/payment_bottom_bar.xml
+++ b/wallet/src/main/res/layout/payment_bottom_bar.xml
@@ -32,13 +32,13 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
- android:layout_marginBottom="8dp"
+ android:layout_marginBottom="27dp"
android:text="@string/payment_label_amount_total"
android:visibility="invisible"
- app:layout_constraintBottom_toTopOf="@+id/abortButton"
+ app:layout_constraintBottom_toTopOf="@+id/confirmButton"
app:layout_constraintEnd_toStartOf="@+id/totalView"
app:layout_constraintHorizontal_bias="1.0"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
@@ -79,18 +79,6 @@
tools:text="@string/payment_fee"
tools:visibility="visible" />
- <Button
- android:id="@+id/abortButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:backgroundTint="@color/red"
- android:text="@string/payment_button_abort"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/confirmButton"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintStart_toStartOf="parent" />
-
<Button
android:id="@+id/confirmButton"
android:layout_width="wrap_content"
@@ -101,8 +89,8 @@
android:text="@string/payment_button_confirm"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/abortButton"
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/feeView"
tools:enabled="true" />
diff --git a/wallet/src/main/res/values/strings.xml
b/wallet/src/main/res/values/strings.xml
index 6bc073f..b16808c 100644
--- a/wallet/src/main/res/values/strings.xml
+++ b/wallet/src/main/res/values/strings.xml
@@ -26,7 +26,6 @@
<string name="nav_error">Error</string>
<string name="button_back">Go Back</string>
- <string name="button_cancel">Cancel</string>
<string name="button_continue">Continue</string>
<string name="button_scan_qr_code">Scan Taler QR Code</string>
@@ -68,7 +67,6 @@
<string name="payment_fee">+%s payment fee</string>
<string name="payment_button_confirm">Confirm Payment</string>
- <string name="payment_button_abort">Abort</string>
<string name="payment_label_amount_total">Total Amount:</string>
<string name="payment_label_order_summary">Order</string>
<string name="payment_error">Error: %s</string>
--
To stop receiving notification emails like this one, please contact
address@hidden.