aboutsummaryrefslogtreecommitdiff
path: root/wallet/src/main/res/layout/fragment_transactions.xml
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2022-08-23 14:20:21 -0300
committerTorsten Grote <t@grobox.de>2022-08-23 14:42:24 -0300
commit07098f6660b19320bed36d24758464c662c74531 (patch)
tree1790f6389a192957b49544fe2038544bd5458a49 /wallet/src/main/res/layout/fragment_transactions.xml
parent2fbda24d2205ace0ede93faa824f7836d0ece445 (diff)
downloadtaler-android-07098f6660b19320bed36d24758464c662c74531.tar.gz
taler-android-07098f6660b19320bed36d24758464c662c74531.tar.bz2
taler-android-07098f6660b19320bed36d24758464c662c74531.zip
[wallet] Move balance down in transaction list
and show new buttons for sending/receiving (not functional yet)
Diffstat (limited to 'wallet/src/main/res/layout/fragment_transactions.xml')
-rw-r--r--wallet/src/main/res/layout/fragment_transactions.xml90
1 files changed, 86 insertions, 4 deletions
diff --git a/wallet/src/main/res/layout/fragment_transactions.xml b/wallet/src/main/res/layout/fragment_transactions.xml
index 22d6d48..60675bb 100644
--- a/wallet/src/main/res/layout/fragment_transactions.xml
+++ b/wallet/src/main/res/layout/fragment_transactions.xml
@@ -14,19 +14,91 @@
~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
-->
-<FrameLayout 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="match_parent">
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/sendButton"
+ style="@style/Widget.MaterialComponents.Button.TextButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/transactions_send_funds"
+ app:layout_constraintBottom_toTopOf="@+id/divider"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/receiveButton"
+ style="@style/Widget.MaterialComponents.Button.TextButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/transactions_receive_funds"
+ app:layout_constraintBottom_toTopOf="@+id/divider"
+ app:layout_constraintEnd_toStartOf="@+id/amount"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintStart_toEndOf="@+id/sendButton"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <TextView
+ android:id="@+id/balanceLabel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="16dp"
+ android:text="@string/transactions_balance"
+ android:textSize="14sp"
+ app:layout_constraintBottom_toTopOf="@+id/amount"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintStart_toEndOf="@+id/receiveButton"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <TextView
+ android:id="@+id/amount"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="8dp"
+ android:textSize="24sp"
+ android:textStyle="bold"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintBottom_toTopOf="@+id/divider"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/receiveButton"
+ app:layout_constraintTop_toBottomOf="@+id/balanceLabel"
+ tools:text="23.42"
+ tools:visibility="visible" />
+
+ <androidx.constraintlayout.widget.Barrier
+ android:id="@+id/topBarrier"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:barrierDirection="bottom"
+ app:constraint_referenced_ids="sendButton,receiveButton,amount" />
+
+ <com.google.android.material.divider.MaterialDivider
+ android:id="@+id/divider"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/topBarrier" />
+
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="0dp"
android:scrollbars="vertical"
android:visibility="invisible"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/divider"
tools:listitem="@layout/list_item_transaction"
tools:visibility="visible" />
@@ -37,6 +109,10 @@
android:layout_gravity="center"
android:text="@string/transactions_empty"
android:visibility="invisible"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/divider"
tools:visibility="visible" />
<ProgressBar
@@ -46,6 +122,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="invisible"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/divider"
tools:visibility="visible" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
@@ -55,6 +135,8 @@
android:layout_height="wrap_content"
android:contentDescription="@string/button_scan_qr_code"
android:src="@drawable/ic_scan_qr"
- app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior" />
+ app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent" />
-</FrameLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>