summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-03-16 14:48:02 -0300
committerTorsten Grote <t@grobox.de>2020-03-16 14:48:02 -0300
commitbca790d381880b3077df0e37cf29b7a2f9e2266c (patch)
treef9ea562c0a3a056cdcd300c9bccb526228346b55 /app/src/main/res
parente4750a543a8b243e02f6156a6d08bbc8a3cf6cc2 (diff)
downloadmerchant-terminal-android-bca790d381880b3077df0e37cf29b7a2f9e2266c.tar.gz
merchant-terminal-android-bca790d381880b3077df0e37cf29b7a2f9e2266c.tar.bz2
merchant-terminal-android-bca790d381880b3077df0e37cf29b7a2f9e2266c.zip
Clean up history code and layout
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/history_row.xml91
-rw-r--r--app/src/main/res/layout/list_item_history.xml84
-rw-r--r--app/src/main/res/navigation/nav_graph.xml2
-rw-r--r--app/src/main/res/values/strings.xml2
4 files changed, 86 insertions, 93 deletions
diff --git a/app/src/main/res/layout/history_row.xml b/app/src/main/res/layout/history_row.xml
deleted file mode 100644
index e68e5a0..0000000
--- a/app/src/main/res/layout/history_row.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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/>
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginTop="8dp"
- android:layout_marginEnd="16dp"
- android:layout_marginBottom="8dp"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/text_history_summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="24sp"
- android:textStyle="bold"
- tools:text="One Cappuccino" />
-
- <TextView
- android:id="@+id/text_history_amount"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="20sp"
- android:textStyle="bold"
- tools:text="1 Euro" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/history_received_at"
- android:textAllCaps="false"
- android:textSize="20sp"
- android:textStyle="italic" />
-
-
- <TextView
- android:id="@+id/text_history_time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="20sp"
- tools:text="2019-08-31 14:25" />
-
- </LinearLayout>
-
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/history_ref_no"
- android:textAllCaps="false"
- android:textSize="20sp"
- android:textStyle="italic" />
-
- <TextView
- android:id="@+id/text_history_order_id"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAllCaps="false"
- android:textSize="20sp"
- android:textStyle="italic"
- tools:text="2019.242-014B6QPF1M1HC5TY" />
- </LinearLayout>
-
-</LinearLayout>
diff --git a/app/src/main/res/layout/list_item_history.xml b/app/src/main/res/layout/list_item_history.xml
new file mode 100644
index 0000000..06ffff2
--- /dev/null
+++ b/app/src/main/res/layout/list_item_history.xml
@@ -0,0 +1,84 @@
+<?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:padding="16dp">
+
+ <TextView
+ android:id="@+id/orderSummaryView"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="20sp"
+ android:textStyle="bold"
+ app:layout_constraintEnd_toStartOf="@+id/orderAmountView"
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="One Cappuccino or another name that can be so long that it spans more than one line" />
+
+ <TextView
+ android:id="@+id/orderAmountView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="20sp"
+ android:textStyle="bold"
+ app:layout_constraintBottom_toBottomOf="@+id/orderSummaryView"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.0"
+ app:layout_constraintStart_toEndOf="@+id/orderSummaryView"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.0"
+ tools:text="23.42 TESTKUDOS" />
+
+ <TextView
+ android:id="@+id/orderIdView"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:text="@string/history_ref_no"
+ android:textAllCaps="false"
+ android:textSize="20sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@+id/orderTimeView"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/orderSummaryView" />
+
+ <TextView
+ android:id="@+id/orderTimeView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:textSize="20sp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/orderIdView"
+ app:layout_constraintTop_toBottomOf="@+id/orderAmountView"
+ app:layout_constraintVertical_bias="1.0"
+ tools:text="3 hrs. ago" />
+
+</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 f00d21c..0d7d870 100644
--- a/app/src/main/res/navigation/nav_graph.xml
+++ b/app/src/main/res/navigation/nav_graph.xml
@@ -55,7 +55,7 @@
<fragment
android:id="@+id/nav_history"
- android:name="net.taler.merchantpos.MerchantHistory"
+ android:name="net.taler.merchantpos.history.MerchantHistoryFragment"
android:label="@string/history_label"
tools:layout="@layout/fragment_merchant_history" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 740a080..ac84c5d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -47,7 +47,7 @@
<string name="history_label">Payment History</string>
<string name="history_received_at">Received at</string>
- <string name="history_ref_no">Ref. No:</string>
+ <string name="history_ref_no">Ref. No: %s</string>
<string name="error_network">Network Error</string>