summaryrefslogtreecommitdiff
path: root/wallet/src/main/res
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-05-14 10:36:29 -0300
committerTorsten Grote <t@grobox.de>2020-05-15 14:26:41 -0300
commitbedd7b05eb0b5ee69cd5f35b283e713cf8af29dc (patch)
tree4791cceacb11b421e7deaa603478c4098fc9e38b /wallet/src/main/res
parente74f39ee86f32b4e0324405af1f0c7be061fb372 (diff)
downloadtaler-android-bedd7b05eb0b5ee69cd5f35b283e713cf8af29dc.tar.gz
taler-android-bedd7b05eb0b5ee69cd5f35b283e713cf8af29dc.tar.bz2
taler-android-bedd7b05eb0b5ee69cd5f35b283e713cf8af29dc.zip
[wallet] render transaction list from new transactions API
Diffstat (limited to 'wallet/src/main/res')
-rw-r--r--wallet/src/main/res/layout/fragment_transaction_payment.xml (renamed from wallet/src/main/res/layout/fragment_event_paid.xml)0
-rw-r--r--wallet/src/main/res/layout/fragment_transaction_withdrawal.xml (renamed from wallet/src/main/res/layout/fragment_event_withdraw.xml)0
-rw-r--r--wallet/src/main/res/layout/list_item_transaction.xml89
-rw-r--r--wallet/src/main/res/menu/transactions_detail.xml4
-rw-r--r--wallet/src/main/res/navigation/nav_graph.xml2
-rw-r--r--wallet/src/main/res/values/strings.xml6
6 files changed, 94 insertions, 7 deletions
diff --git a/wallet/src/main/res/layout/fragment_event_paid.xml b/wallet/src/main/res/layout/fragment_transaction_payment.xml
index 3f17464..3f17464 100644
--- a/wallet/src/main/res/layout/fragment_event_paid.xml
+++ b/wallet/src/main/res/layout/fragment_transaction_payment.xml
diff --git a/wallet/src/main/res/layout/fragment_event_withdraw.xml b/wallet/src/main/res/layout/fragment_transaction_withdrawal.xml
index 5d30fcf..5d30fcf 100644
--- a/wallet/src/main/res/layout/fragment_event_withdraw.xml
+++ b/wallet/src/main/res/layout/fragment_transaction_withdrawal.xml
diff --git a/wallet/src/main/res/layout/list_item_transaction.xml b/wallet/src/main/res/layout/list_item_transaction.xml
new file mode 100644
index 0000000..058b170
--- /dev/null
+++ b/wallet/src/main/res/layout/list_item_transaction.xml
@@ -0,0 +1,89 @@
+<?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="wrap_content"
+ android:background="@drawable/selectable_background"
+ android:foreground="?attr/selectableItemBackground"
+ android:paddingStart="16dp"
+ android:paddingTop="8dp"
+ android:paddingEnd="16dp"
+ android:paddingBottom="8dp">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:tint="?android:colorControlNormal"
+ tools:ignore="ContentDescription"
+ tools:src="@drawable/ic_cash_usd_outline" />
+
+ <TextView
+ android:id="@+id/title"
+ style="@style/TransactionTitle"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="8dp"
+ app:layout_constraintEnd_toStartOf="@+id/amount"
+ app:layout_constraintStart_toEndOf="@+id/icon"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="@string/transaction_payment" />
+
+ <TextView
+ android:id="@+id/amount"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="24sp"
+ app:layout_constraintBottom_toTopOf="@+id/pendingView"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="- 1337.23" />
+
+ <TextView
+ android:id="@+id/time"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="8dp"
+ android:textSize="14sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@+id/amount"
+ app:layout_constraintStart_toStartOf="@+id/title"
+ app:layout_constraintTop_toBottomOf="@+id/title"
+ tools:text="23 min ago" />
+
+ <TextView
+ android:id="@+id/pendingView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/transaction_pending"
+ android:textSize="14sp"
+ android:visibility="gone"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintStart_toEndOf="@+id/time"
+ app:layout_constraintTop_toBottomOf="@+id/amount"
+ tools:visibility="visible" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/wallet/src/main/res/menu/transactions_detail.xml b/wallet/src/main/res/menu/transactions_detail.xml
index 388e3c4..d4568d4 100644
--- a/wallet/src/main/res/menu/transactions_detail.xml
+++ b/wallet/src/main/res/menu/transactions_detail.xml
@@ -16,8 +16,4 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
- <item
- android:id="@+id/show_json"
- android:title="@string/transactions_detail_json"
- app:showAsAction="never" />
</menu>
diff --git a/wallet/src/main/res/navigation/nav_graph.xml b/wallet/src/main/res/navigation/nav_graph.xml
index 8e717c1..5523d8b 100644
--- a/wallet/src/main/res/navigation/nav_graph.xml
+++ b/wallet/src/main/res/navigation/nav_graph.xml
@@ -71,7 +71,7 @@
android:id="@+id/nav_transactions_detail"
android:name="net.taler.wallet.transactions.TransactionDetailFragment"
android:label="@string/transactions_detail_title"
- tools:layout="@layout/fragment_event_withdraw" />
+ tools:layout="@layout/fragment_transaction_withdrawal" />
<fragment
android:id="@+id/alreadyPaid"
diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml
index 56ff2ef..44b2dad 100644
--- a/wallet/src/main/res/values/strings.xml
+++ b/wallet/src/main/res/values/strings.xml
@@ -80,8 +80,10 @@ GNU Taler is immune against many types of fraud, such as phishing of credit card
<string name="transaction_order_refused">Purchase Cancelled</string>
<string name="transaction_tip_accepted">Tip Accepted</string>
<string name="transaction_tip_declined">Tip Declined</string>
- <string name="transaction_refund">Refund</string>
- <string name="transaction_refresh">Obtained change</string>
+ <string name="transaction_tip_from">Tip from %s</string>
+ <string name="transaction_refund">Refund from %s</string>
+ <string name="transaction_pending">PENDING</string>
+ <string name="transaction_refresh">Coin expiry change fee</string>
<string name="transaction_refresh_reason_manual">because of manual request</string>
<string name="transaction_refresh_reason_pay">for payment</string>
<string name="transaction_refresh_reason_refund">for refund</string>