aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-04-02 10:57:36 -0300
committerTorsten Grote <t@grobox.de>2020-04-02 10:57:36 -0300
commitc3f777e6154d33d26b2431fa886678edf029dd34 (patch)
treeadc7e00e835d46fd4fd57ea7391a3e0c67cbbd6f
parent5cd83038f5aed997010dd01fef7bf6467ef56b29 (diff)
downloadtaler-android-c3f777e6154d33d26b2431fa886678edf029dd34.tar.gz
taler-android-c3f777e6154d33d26b2431fa886678edf029dd34.tar.bz2
taler-android-c3f777e6154d33d26b2431fa886678edf029dd34.zip
[wallet] remove abort/cancel buttons
-rw-r--r--wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt5
-rw-r--r--wallet/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt9
-rw-r--r--wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt8
-rw-r--r--wallet/src/main/res/layout-w550dp/payment_bottom_bar.xml18
-rw-r--r--wallet/src/main/res/layout/fragment_prompt_withdraw.xml24
-rw-r--r--wallet/src/main/res/layout/fragment_review_exchange_tos.xml14
-rw-r--r--wallet/src/main/res/layout/payment_bottom_bar.xml22
-rw-r--r--wallet/src/main/res/values/strings.xml2
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" />
@@ -79,19 +78,6 @@
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"
android:layout_height="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
@@ -77,17 +77,6 @@
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"
android:layout_height="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"
@@ -80,18 +80,6 @@
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"
android:layout_height="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>