diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_error.xml | 25 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_error.xml | 97 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_withdraw_successful.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/navigation/nav_graph.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 4 |
5 files changed, 137 insertions, 1 deletions
diff --git a/app/src/main/res/drawable/ic_error.xml b/app/src/main/res/drawable/ic_error.xml new file mode 100644 index 0000000..1f705af --- /dev/null +++ b/app/src/main/res/drawable/ic_error.xml @@ -0,0 +1,25 @@ +<!-- + ~ This file is part of GNU Taler + ~ (C) 2020 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/> +</vector> diff --git a/app/src/main/res/layout/fragment_error.xml b/app/src/main/res/layout/fragment_error.xml new file mode 100644 index 0000000..3d977dd --- /dev/null +++ b/app/src/main/res/layout/fragment_error.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ This file is part of GNU Taler + ~ (C) 2020 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".withdraw.ErrorFragment"> + + <ImageView + android:id="@+id/errorImageView" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_margin="16dp" + android:alpha="0.56" + android:src="@drawable/ic_error" + android:tint="@color/red" + app:layout_constraintBottom_toTopOf="@+id/errorTitle" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" + app:layout_constraintVertical_chainStyle="packed" + tools:ignore="ContentDescription" /> + + <TextView + android:id="@+id/errorTitle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:gravity="center_horizontal|top" + android:minHeight="64dp" + android:textColor="@color/red" + app:autoSizeMaxTextSize="40sp" + app:autoSizeTextType="uniform" + app:layout_constraintBottom_toTopOf="@+id/errorMessage" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/errorImageView" + tools:text="@string/withdraw_error_title" /> + + <TextView + android:id="@+id/errorMessage" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:gravity="center" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" + app:layout_constraintBottom_toTopOf="@+id/errorDevMessage" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/errorTitle" + tools:text="@string/withdraw_error_message" /> + + <TextView + android:id="@+id/errorDevMessage" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:fontFamily="monospace" + android:gravity="center" + android:textColor="@color/red" + android:textIsSelectable="true" + android:visibility="gone" + app:layout_constraintBottom_toTopOf="@+id/backButton" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/errorMessage" + tools:text="Error: Fetching keys failed: unexpected status for keys: 502" + tools:visibility="visible" /> + + <Button + android:id="@+id/backButton" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:text="@string/button_back" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/fragment_withdraw_successful.xml b/app/src/main/res/layout/fragment_withdraw_successful.xml index d1b9c90..2b7c308 100644 --- a/app/src/main/res/layout/fragment_withdraw_successful.xml +++ b/app/src/main/res/layout/fragment_withdraw_successful.xml @@ -43,6 +43,7 @@ android:layout_margin="16dp" android:text="@string/withdraw_success_info" android:textAlignment="center" + android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintBottom_toTopOf="@+id/backButton" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -53,7 +54,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_margin="16dp" - android:text="@string/button_back" + android:text="@string/button_continue" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index e540c12..549ca01 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -81,6 +81,10 @@ android:id="@+id/action_promptWithdraw_to_reviewExchangeTOS" app:destination="@id/reviewExchangeTOS" app:popUpTo="@id/showBalance" /> + <action + android:id="@+id/action_promptWithdraw_to_errorFragment" + app:destination="@id/errorFragment" + app:popUpTo="@id/showBalance" /> </fragment> <fragment @@ -104,6 +108,11 @@ android:name="net.taler.wallet.pending.PendingOperationsFragment" android:label="Pending Operations" tools:layout="@layout/fragment_pending_operations" /> + <fragment + android:id="@+id/errorFragment" + android:name="net.taler.wallet.withdraw.ErrorFragment" + android:label="@string/nav_error" + tools:layout="@layout/fragment_error" /> <action android:id="@+id/action_global_promptPayment" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b8f41fb..5120492 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -23,9 +23,11 @@ <string name="nav_prompt_withdraw">Withdraw Digital Cash</string> <string name="nav_exchange_tos">Exchange\'s Terms of Service</string> + <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> <string name="menu_history">History</string> @@ -84,6 +86,8 @@ <string name="withdraw_exchange">Using the exchange provider</string> <string name="withdraw_button_testkudos">Withdraw TESTKUDOS</string> <string name="withdraw_button_confirm">Confirm Withdraw</string> + <string name="withdraw_error_title">Withdrawal Error</string> + <string name="withdraw_error_message">Withdrawing is currently not possible. Please try again later!</string> <string name="pending_operations_title">Pending Operations</string> <string name="pending_operations_refuse">Refuse Proposal</string> |