From db8318b8cf3f8f0390e6da2cb1214546811d4388 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 21 Dec 2018 20:22:58 +0000 Subject: [PATCH] CardView! --- .../mobileledger/TransactionListAdapter.java | 2 +- .../main/res/layout/transaction_list_row.xml | 171 ++++++++++-------- 2 files changed, 92 insertions(+), 81 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/TransactionListAdapter.java b/app/src/main/java/net/ktnx/mobileledger/TransactionListAdapter.java index 2e52093d..e69aab7b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/TransactionListAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/TransactionListAdapter.java @@ -125,7 +125,7 @@ class TransactionListAdapter ConstraintLayout row; public TransactionRowHolder(@NonNull View itemView) { super(itemView); - this.row = (ConstraintLayout) itemView; + this.row = itemView.findViewById(R.id.transaction_row); this.tvDescription = itemView.findViewById(R.id.transaction_row_description); this.tvDate = itemView.findViewById(R.id.transaction_row_date); this.tableAccounts = itemView.findViewById(R.id.transaction_row_acc_amounts); diff --git a/app/src/main/res/layout/transaction_list_row.xml b/app/src/main/res/layout/transaction_list_row.xml index a9e6c9b7..64b4fe72 100644 --- a/app/src/main/res/layout/transaction_list_row.xml +++ b/app/src/main/res/layout/transaction_list_row.xml @@ -18,117 +18,128 @@ ~ along with Mobile-Ledger. If not, see . --> - + android:layout_margin="8dp" + app:cardCornerRadius="16dp" + app:cardElevation="4dp" + app:cardUseCompatPadding="false" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_goneMarginBottom="8dp"> - - - - - - - - - - - - + android:padding="8dp"> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent"> + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/transaction_row_head" /> - + + + android:gravity="center_vertical" + android:orientation="horizontal" + android:paddingStart="8dp" + android:paddingEnd="0dp"> - + + + + + + android:gravity="center_vertical" + android:orientation="horizontal" + android:paddingStart="8dp" + android:paddingEnd="0dp"> + + + + + - - \ No newline at end of file + + + -- 2.39.5