gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-android] branch master updated (09b66e7 -> d9a578a)


From: gnunet
Subject: [taler-wallet-android] branch master updated (09b66e7 -> d9a578a)
Date: Fri, 06 Mar 2020 19:07:40 +0100

This is an automated email from the git hooks/post-receive script.

torsten-grote pushed a change to branch master
in repository wallet-android.

    from 09b66e7  Use better icons for navigation drawer menu
     new 826c016  Show version name and code in navigation drawer when dev mode 
is on
     new d9a578a  Show error screen when withdrawal fails

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitlab-ci.yml                                     |  4 +-
 app/src/main/java/net/taler/wallet/MainActivity.kt | 12 +++
 ...hdrawSuccessfulFragment.kt => ErrorFragment.kt} | 26 +++++-
 .../wallet/withdraw/PromptWithdrawFragment.kt      |  8 +-
 .../net/taler/wallet/withdraw/WithdrawManager.kt   | 13 ++-
 .../{ic_home_black_24dp.xml => ic_error.xml}       |  2 +-
 app/src/main/res/layout/activity_main.xml          |  2 +-
 ...ragment_show_balance.xml => fragment_error.xml} | 96 ++++++++++++----------
 .../res/layout/fragment_withdraw_successful.xml    |  3 +-
 app/src/main/res/layout/nav_header_main.xml        | 55 +++++++++----
 app/src/main/res/navigation/nav_graph.xml          |  9 ++
 app/src/main/res/values/strings.xml                |  4 +
 12 files changed, 157 insertions(+), 77 deletions(-)
 copy 
app/src/main/java/net/taler/wallet/withdraw/{WithdrawSuccessfulFragment.kt => 
ErrorFragment.kt} (59%)
 copy app/src/main/res/drawable/{ic_home_black_24dp.xml => ic_error.xml} (88%)
 copy app/src/main/res/layout/{fragment_show_balance.xml => fragment_error.xml} 
(52%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3cdba25..30b19d4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,9 +11,9 @@ stages:
 
 default:
   before_script:
-    - wget 
https://git.taler.net/wallet-android.git/plain/akono.aar?h=binary-deps -O 
akono/akono.aar
+    - wget 
"https://git.taler.net/wallet-android.git/plain/akono.aar?h=binary-deps"; -O 
akono/akono.aar
     - mkdir -p app/src/main/assets
-    - wget 
https://git.taler.net/wallet-android.git/plain/taler-wallet-android.js?h=binary-deps
 -O app/src/main/assets/taler-wallet-android.js
+    - wget 
"https://git.taler.net/wallet-android.git/plain/taler-wallet-android.js?h=binary-deps";
 -O app/src/main/assets/taler-wallet-android.js
 
 test:
   stage: test
diff --git a/app/src/main/java/net/taler/wallet/MainActivity.kt 
b/app/src/main/java/net/taler/wallet/MainActivity.kt
index bca5e33..c2f20f7 100644
--- a/app/src/main/java/net/taler/wallet/MainActivity.kt
+++ b/app/src/main/java/net/taler/wallet/MainActivity.kt
@@ -16,6 +16,7 @@
 
 package net.taler.wallet
 
+import android.annotation.SuppressLint
 import android.content.BroadcastReceiver
 import android.content.Context
 import android.content.Intent
@@ -24,8 +25,10 @@ import android.content.IntentFilter
 import android.os.Bundle
 import android.util.Log
 import android.view.MenuItem
+import android.view.View.GONE
 import android.view.View.INVISIBLE
 import android.view.View.VISIBLE
+import android.widget.TextView
 import androidx.activity.viewModels
 import androidx.appcompat.app.AppCompatActivity
 import androidx.core.view.GravityCompat.START
@@ -41,6 +44,8 @@ import com.google.zxing.integration.android.IntentIntegrator
 import 
com.google.zxing.integration.android.IntentIntegrator.parseActivityResult
 import kotlinx.android.synthetic.main.activity_main.*
 import kotlinx.android.synthetic.main.app_bar_main.*
+import net.taler.wallet.BuildConfig.VERSION_CODE
+import net.taler.wallet.BuildConfig.VERSION_NAME
 import net.taler.wallet.HostCardEmulatorService.Companion.HTTP_TUNNEL_RESPONSE
 import 
net.taler.wallet.HostCardEmulatorService.Companion.MERCHANT_NFC_CONNECTED
 import 
net.taler.wallet.HostCardEmulatorService.Companion.MERCHANT_NFC_DISCONNECTED
@@ -54,6 +59,7 @@ class MainActivity : AppCompatActivity(), 
OnNavigationItemSelectedListener,
 
     private lateinit var nav: NavController
 
+    @SuppressLint("SetTextI18n")
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         setContentView(R.layout.activity_main)
@@ -77,8 +83,14 @@ class MainActivity : AppCompatActivity(), 
OnNavigationItemSelectedListener,
             progress_bar.visibility = if (show) VISIBLE else INVISIBLE
         })
 
+        val versionView: TextView = 
nav_view.getHeaderView(0).findViewById(R.id.versionView)
         model.devMode.observe(this, Observer { enabled ->
             nav_view.menu.findItem(R.id.nav_pending_operations).isVisible = 
enabled
+            if (enabled) {
+                @SuppressLint("SetTextI18n")
+                versionView.text = "$VERSION_NAME ($VERSION_CODE)"
+                versionView.visibility = VISIBLE
+            } else versionView.visibility = GONE
         })
 
         if (intent.action == ACTION_VIEW) intent.dataString?.let { uri ->
diff --git 
a/app/src/main/java/net/taler/wallet/withdraw/WithdrawSuccessfulFragment.kt 
b/app/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt
similarity index 59%
copy from 
app/src/main/java/net/taler/wallet/withdraw/WithdrawSuccessfulFragment.kt
copy to app/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt
index 5daeff1..f0f6610 100644
--- a/app/src/main/java/net/taler/wallet/withdraw/WithdrawSuccessfulFragment.kt
+++ b/app/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt
@@ -19,23 +19,43 @@ package net.taler.wallet.withdraw
 import android.os.Bundle
 import android.view.LayoutInflater
 import android.view.View
+import android.view.View.GONE
+import android.view.View.VISIBLE
 import android.view.ViewGroup
 import androidx.fragment.app.Fragment
+import androidx.fragment.app.activityViewModels
 import androidx.navigation.fragment.findNavController
-import kotlinx.android.synthetic.main.fragment_withdraw_successful.*
+import kotlinx.android.synthetic.main.fragment_error.*
 import net.taler.wallet.R
+import net.taler.wallet.WalletViewModel
 
-class WithdrawSuccessfulFragment : Fragment() {
+class ErrorFragment : Fragment() {
+
+    private val model: WalletViewModel by activityViewModels()
+    private val withdrawManager by lazy { model.withdrawManager }
 
     override fun onCreateView(
         inflater: LayoutInflater, container: ViewGroup?,
         savedInstanceState: Bundle?
     ): View? {
-        return inflater.inflate(R.layout.fragment_withdraw_successful, 
container, false)
+        return inflater.inflate(R.layout.fragment_error, container, false)
     }
 
     override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
         super.onViewCreated(view, savedInstanceState)
+
+        errorTitle.setText(R.string.withdraw_error_title)
+        errorMessage.setText(R.string.withdraw_error_message)
+
+        // show dev error message if dev mode is on
+        val status = withdrawManager.withdrawStatus.value
+        if (model.devMode.value == true && status is WithdrawStatus.Error) {
+            errorDevMessage.visibility = VISIBLE
+            errorDevMessage.text = status.message
+        } else {
+            errorDevMessage.visibility = GONE
+        }
+
         backButton.setOnClickListener {
             findNavController().navigateUp()
         }
diff --git 
a/app/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt 
b/app/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
index 0b14e32..454816b 100644
--- a/app/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
+++ b/app/src/main/java/net/taler/wallet/withdraw/PromptWithdrawFragment.kt
@@ -67,7 +67,7 @@ class PromptWithdrawFragment : Fragment() {
         })
     }
 
-    private fun showWithdrawStatus(status: WithdrawStatus) = when (status) {
+    private fun showWithdrawStatus(status: WithdrawStatus?) = when (status) {
         is WithdrawStatus.ReceivedDetails -> {
             model.showProgressBar.value = false
             progressBar.fadeOut()
@@ -86,7 +86,7 @@ class PromptWithdrawFragment : Fragment() {
         }
         is WithdrawStatus.Success -> {
             model.showProgressBar.value = false
-            withdrawManager.withdrawStatus.value = WithdrawStatus.None
+            withdrawManager.withdrawStatus.value = null
             
findNavController().navigate(R.id.action_promptWithdraw_to_withdrawSuccessful)
         }
         is Loading -> {
@@ -99,9 +99,11 @@ class PromptWithdrawFragment : Fragment() {
             model.showProgressBar.value = false
             
findNavController().navigate(R.id.action_promptWithdraw_to_reviewExchangeTOS)
         }
-        is WithdrawStatus.None -> {
+        is WithdrawStatus.Error -> {
             model.showProgressBar.value = false
+            
findNavController().navigate(R.id.action_promptWithdraw_to_errorFragment)
         }
+        null -> model.showProgressBar.value = false
     }
 
 }
diff --git a/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt 
b/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
index 8179d8d..e3af757 100644
--- a/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
+++ b/app/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
@@ -24,7 +24,6 @@ import net.taler.wallet.backend.WalletBackendApi
 import org.json.JSONObject
 
 sealed class WithdrawStatus {
-    object None : WithdrawStatus()
     data class Loading(val talerWithdrawUri: String) : WithdrawStatus()
     data class TermsOfServiceReviewRequired(
         val talerWithdrawUri: String,
@@ -35,7 +34,6 @@ sealed class WithdrawStatus {
         val suggestedExchange: String
     ) : WithdrawStatus()
 
-    object Success : WithdrawStatus()
     data class ReceivedDetails(
         val talerWithdrawUri: String,
         val amount: Amount,
@@ -43,11 +41,14 @@ sealed class WithdrawStatus {
     ) : WithdrawStatus()
 
     data class Withdrawing(val talerWithdrawUri: String) : WithdrawStatus()
+
+    object Success : WithdrawStatus()
+    data class Error(val message: String?) : WithdrawStatus()
 }
 
 class WithdrawManager(private val walletBackendApi: WalletBackendApi) {
 
-    val withdrawStatus = MutableLiveData<WithdrawStatus>(WithdrawStatus.None)
+    val withdrawStatus = MutableLiveData<WithdrawStatus>()
     val testWithdrawalInProgress = MutableLiveData(false)
 
     private var currentWithdrawRequestId = 0
@@ -72,6 +73,8 @@ class WithdrawManager(private val walletBackendApi: 
WalletBackendApi) {
         walletBackendApi.sendRequest("getWithdrawDetailsForUri", args) { 
isError, result ->
             if (isError) {
                 Log.e(TAG, "Error getWithdrawDetailsForUri 
${result.toString(4)}")
+                val message = if (result.has("message")) 
result.getString("message") else null
+                withdrawStatus.postValue(WithdrawStatus.Error(message))
                 return@sendRequest
             }
             if (myWithdrawRequestId != this.currentWithdrawRequestId) {
@@ -104,6 +107,8 @@ class WithdrawManager(private val walletBackendApi: 
WalletBackendApi) {
         walletBackendApi.sendRequest("getWithdrawDetailsForUri", args) { 
isError, result ->
             if (isError) {
                 Log.e(TAG, "Error getWithdrawDetailsForUri 
${result.toString(4)}")
+                val message = if (result.has("message")) 
result.getString("message") else null
+                withdrawStatus.postValue(WithdrawStatus.Error(message))
                 return@sendRequest
             }
             if (myWithdrawRequestId != this.currentWithdrawRequestId) {
@@ -198,7 +203,7 @@ class WithdrawManager(private val walletBackendApi: 
WalletBackendApi) {
 
     fun cancelCurrentWithdraw() {
         currentWithdrawRequestId++
-        withdrawStatus.value = WithdrawStatus.None
+        withdrawStatus.value = null
     }
 
 }
diff --git a/app/src/main/res/drawable/ic_home_black_24dp.xml 
b/app/src/main/res/drawable/ic_error.xml
similarity index 88%
copy from app/src/main/res/drawable/ic_home_black_24dp.xml
copy to app/src/main/res/drawable/ic_error.xml
index ed8aa1e..1f705af 100644
--- a/app/src/main/res/drawable/ic_home_black_24dp.xml
+++ b/app/src/main/res/drawable/ic_error.xml
@@ -21,5 +21,5 @@
         android:viewportHeight="24.0">
     <path
         android:fillColor="#FF000000"
-        android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
+        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/activity_main.xml 
b/app/src/main/res/layout/activity_main.xml
index 7769fd3..0612306 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -33,7 +33,7 @@
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:layout_gravity="start"
-            android:fitsSystemWindows="true"
+            android:fitsSystemWindows="false"
             app:headerLayout="@layout/nav_header_main"
             app:menu="@menu/activity_main_drawer" />
 
diff --git a/app/src/main/res/layout/fragment_show_balance.xml 
b/app/src/main/res/layout/fragment_error.xml
similarity index 52%
copy from app/src/main/res/layout/fragment_show_balance.xml
copy to app/src/main/res/layout/fragment_error.xml
index 5bc6ee8..3d977dd 100644
--- a/app/src/main/res/layout/fragment_show_balance.xml
+++ b/app/src/main/res/layout/fragment_error.xml
@@ -13,79 +13,85 @@
   ~ 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">
+        android:layout_height="match_parent"
+        tools:context=".withdraw.ErrorFragment">
 
-    <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/balancesList"
+    <ImageView
+            android:id="@+id/errorImageView"
             android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:visibility="gone"
-            app:layout_constraintBottom_toTopOf="@+id/scanButton"
+            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:layout_height="200dp"
-            tools:listitem="@layout/list_item_balance"
-            tools:visibility="visible" />
+            tools:ignore="ContentDescription" />
 
     <TextView
-            android:id="@+id/balancesEmptyState"
+            android:id="@+id/errorTitle"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:autoLink="web"
-            android:gravity="center"
-            android:padding="16dp"
-            android:text="@string/balances_empty_state"
-            android:textSize="18sp"
-            android:visibility="gone"
-            app:layout_constraintBottom_toTopOf="@+id/scanButton"
+            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_toTopOf="parent"
-            tools:visibility="gone" />
+            app:layout_constraintTop_toBottomOf="@+id/errorImageView"
+            tools:text="@string/withdraw_error_title" />
 
-    <androidx.constraintlayout.widget.Barrier
-            android:id="@+id/barrier"
+    <TextView
+            android:id="@+id/errorMessage"
             android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:barrierAllowsGoneWidgets="false"
-            app:barrierDirection="bottom"
-            app:constraint_referenced_ids="balancesList, balancesEmptyState" />
+            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" />
 
-    <Button
-            android:id="@+id/scanButton"
-            android:layout_width="wrap_content"
+    <TextView
+            android:id="@+id/errorDevMessage"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_margin="16dp"
-            android:drawableLeft="@drawable/ic_scan_qr"
-            android:padding="16dp"
-            android:text="@string/button_scan_qr_code"
-            app:layout_constraintBottom_toTopOf="@+id/testWithdrawButton"
+            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/barrier"
-            app:layout_constraintVertical_chainStyle="packed"
-            tools:ignore="RtlHardcoded" />
+            app:layout_constraintTop_toBottomOf="@+id/errorMessage"
+            tools:text="Error: Fetching keys failed: unexpected status for 
keys: 502"
+            tools:visibility="visible" />
 
     <Button
-            android:id="@+id/testWithdrawButton"
-            android:layout_width="wrap_content"
+            android:id="@+id/backButton"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginStart="16dp"
-            android:layout_marginTop="16dp"
-            android:layout_marginEnd="16dp"
-            android:padding="16dp"
-            android:text="@string/withdraw_button_testkudos"
+            android:layout_margin="16dp"
+            android:text="@string/button_back"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/scanButton"
-            tools:visibility="visible" />
+            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/layout/nav_header_main.xml 
b/app/src/main/res/layout/nav_header_main.xml
index f21d6a3..5574c1f 100644
--- a/app/src/main/res/layout/nav_header_main.xml
+++ b/app/src/main/res/layout/nav_header_main.xml
@@ -14,39 +14,60 @@
   ~ GNU Taler; see the file COPYING.  If not, see 
<http://www.gnu.org/licenses/>
   -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
+<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="@dimen/nav_header_height"
+        android:layout_height="wrap_content"
         android:background="@drawable/side_nav_bar"
-        android:gravity="bottom"
-        android:orientation="vertical"
-        android:paddingLeft="@dimen/activity_horizontal_margin"
-        android:paddingTop="@dimen/activity_vertical_margin"
-        android:paddingRight="@dimen/activity_horizontal_margin"
-        android:paddingBottom="@dimen/activity_vertical_margin"
         android:theme="@style/ThemeOverlay.AppCompat.Dark">
 
     <ImageView
-            android:id="@+id/imageView"
+            android:id="@+id/talerLogoView"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:adjustViewBounds="false"
+            android:layout_margin="16dp"
             android:contentDescription="@string/nav_header_desc"
-            android:paddingTop="@dimen/nav_header_vertical_spacing"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
             app:srcCompat="@mipmap/ic_launcher_round" />
 
     <TextView
-            android:layout_width="match_parent"
+            android:id="@+id/gnuView"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:paddingTop="@dimen/nav_header_vertical_spacing"
+            android:layout_marginStart="16dp"
+            android:layout_marginTop="8dp"
+            android:layout_marginEnd="16dp"
             android:text="@string/nav_header_title"
-            android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
+            android:textAppearance="@style/TextAppearance.AppCompat.Body1"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/talerLogoView" />
 
     <TextView
-            android:id="@+id/textView"
+            android:id="@+id/walletView"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/nav_header_subtitle" />
+            android:layout_marginStart="16dp"
+            android:layout_marginTop="4dp"
+            android:layout_marginBottom="16dp"
+            android:text="@string/nav_header_subtitle"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/gnuView" />
 
-</LinearLayout>
+    <TextView
+            android:id="@+id/versionView"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="8dp"
+            android:layout_marginEnd="16dp"
+            app:layout_constraintBottom_toBottomOf="@+id/walletView"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintHorizontal_bias="0.0"
+            app:layout_constraintStart_toEndOf="@+id/walletView"
+            app:layout_constraintTop_toTopOf="@+id/walletView"
+            tools:text="0.6.9-pre15" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
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>

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]