diff options
author | Torsten Grote <t@grobox.de> | 2019-12-30 12:18:38 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2019-12-30 12:18:38 -0300 |
commit | 1ec44435ab0ab098a04b3f4ee9f2599d99535c41 (patch) | |
tree | 219f16617853af2ba431d8f0f02ed4cc845703b1 /app/src/main/res/layout | |
parent | 35ba17db04f48f4ec41f55ac6944051093f7b78b (diff) | |
download | wallet-android-1ec44435ab0ab098a04b3f4ee9f2599d99535c41.tar.gz wallet-android-1ec44435ab0ab098a04b3f4ee9f2599d99535c41.tar.bz2 wallet-android-1ec44435ab0ab098a04b3f4ee9f2599d99535c41.zip |
Deserialize and render more wallet history events
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/history_payment_sent.xml | 70 | ||||
-rw-r--r-- | app/src/main/res/layout/history_row.xml | 49 | ||||
-rw-r--r-- | app/src/main/res/layout/history_withdrawn.xml | 40 |
3 files changed, 136 insertions, 23 deletions
diff --git a/app/src/main/res/layout/history_payment_sent.xml b/app/src/main/res/layout/history_payment_sent.xml new file mode 100644 index 0000000..0c39133 --- /dev/null +++ b/app/src/main/res/layout/history_payment_sent.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<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:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="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:srcCompat="@drawable/history_withdrawn" + app:tint="?android:colorControlNormal" + tools:ignore="ContentDescription" /> + + <TextView + android:id="@+id/title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" + android:text="@string/history_event_payment_sent" + android:textColor="?android:textColorPrimary" + android:textSize="20sp" + app:layout_constraintEnd_toStartOf="@+id/amountPaidWithFees" + app:layout_constraintStart_toEndOf="@+id/icon" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/summary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + app:layout_constrainedWidth="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/amountPaidWithFees" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toEndOf="@+id/icon" + app:layout_constraintTop_toBottomOf="@+id/title" + app:layout_constraintVertical_bias="0.0" + tools:text="Lots of books" /> + + <TextView + android:id="@+id/amountPaidWithFees" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/red" + app:layout_constraintBottom_toTopOf="@+id/time" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="0.2 TESTKUDOS" /> + + <TextView + android:id="@+id/time" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="14sp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + tools:text="23 min ago" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/history_row.xml b/app/src/main/res/layout/history_row.xml index 2ea6d9d..cab7f0f 100644 --- a/app/src/main/res/layout/history_row.xml +++ b/app/src/main/res/layout/history_row.xml @@ -1,24 +1,57 @@ <?xml version="1.0" encoding="utf-8"?> -<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="wrap_content" - android:orientation="vertical" android:layout_margin="15dp"> + <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:srcCompat="@drawable/ic_account_balance" + app:tint="?android:colorControlNormal" + tools:ignore="ContentDescription" /> + <TextView android:id="@+id/title" - android:layout_width="wrap_content" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:textSize="20sp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/icon" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_chainStyle="packed" + tools:text="My History Event" /> + + <TextView + android:id="@+id/info" + android:layout_width="0dp" android:layout_height="wrap_content" - android:textSize="24sp" - tools:text="My History Event"/> + android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="8dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/time" + app:layout_constraintStart_toEndOf="@+id/icon" + app:layout_constraintTop_toBottomOf="@+id/title" + tools:text="TextView" /> <TextView android:id="@+id/time" - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_marginTop="8dp" android:gravity="end" android:textSize="14sp" - tools:text="3 days ago"/> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/title" + tools:text="3 days ago" /> -</LinearLayout>
\ No newline at end of file +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/history_withdrawn.xml b/app/src/main/res/layout/history_withdrawn.xml index 8290c37..e02046b 100644 --- a/app/src/main/res/layout/history_withdrawn.xml +++ b/app/src/main/res/layout/history_withdrawn.xml @@ -28,34 +28,44 @@ android:text="@string/history_event_withdrawn" android:textColor="?android:textColorPrimary" android:textSize="20sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toEndOf="@+id/icon" app:layout_constraintTop_toTopOf="parent" /> <TextView - android:id="@+id/amountWithdrawnRaw" + android:id="@+id/exchangeUrl" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - app:layout_constraintBottom_toBottomOf="@+id/amountWithdrawnEffective" - app:layout_constraintEnd_toStartOf="@+id/amountWithdrawnEffective" - app:layout_constraintHorizontal_bias="1.0" + android:layout_marginTop="8dp" + app:layout_constrainedWidth="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/fee" + app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toEndOf="@+id/icon" - app:layout_constraintTop_toTopOf="@+id/amountWithdrawnEffective" - tools:text="TESTKUDOS:10" /> + app:layout_constraintTop_toBottomOf="@+id/title" + app:layout_constraintVertical_bias="0.0" + tools:text="http://taler.exchange.url" /> <TextView - android:id="@+id/amountWithdrawnEffective" + android:id="@+id/fee" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="8dp" + android:textColor="@color/red" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/amountWithdrawn" + tools:text="0.2 TESTKUDOS" /> + + <TextView + android:id="@+id/amountWithdrawn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/green" android:textSize="16sp" - android:textColor="?android:textColorPrimary" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toBottomOf="@+id/title" - tools:text="TESTKUDOS:9.8" /> + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toEndOf="@+id/title" + app:layout_constraintTop_toTopOf="parent" + tools:text="10 TESTKUDOS" /> <TextView android:id="@+id/time" @@ -65,7 +75,7 @@ android:textSize="14sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toBottomOf="@+id/amountWithdrawnEffective" + app:layout_constraintTop_toBottomOf="@+id/fee" tools:text="23 min ago" /> </androidx.constraintlayout.widget.ConstraintLayout> |