<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright © 2019 Damyan Ivanov.
+ ~ Copyright © 2020 Damyan Ivanov.
~ This file is part of MoLe.
~ MoLe is free software: you can distribute it and/or modify it
~ under the term of the GNU General Public License as published by
<FrameLayout 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:measureAllChildren="false"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:measureAllChildren="false"
+ >
- <androidx.cardview.widget.CardView
+ <com.google.android.material.card.MaterialCardView
android:id="@+id/transaction_card_view"
+ style="@style/Widget.MaterialComponents.CardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:visibility="visible"
- app:cardCornerRadius="16dp"
- app:cardElevation="4dp"
- app:cardUseCompatPadding="false">
+ app:cardCornerRadius="4dp"
+ app:cardUseCompatPadding="false"
+ >
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/transaction_row"
android:gravity="center_vertical"
android:minHeight="36dp"
android:orientation="horizontal"
- android:padding="8dp">
+ android:padding="8dp"
+ >
<LinearLayout
android:id="@+id/transaction_row_head"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
+ android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
+ app:layout_constraintTop_toTopOf="parent"
+ >
<TextView
android:id="@+id/transaction_row_description"
style="@style/account_summary_account_name"
- android:layout_width="0dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="5"
android:text="---."
- android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
- tools:ignore="HardcodedText" />
-
+ android:textAppearance="@android:style/TextAppearance.Material.Medium"
+ tools:ignore="HardcodedText"
+ />
+ <TextView
+ android:id="@+id/transaction_comment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:text="Comment text"
+ android:textStyle="italic"
+ tools:ignore="HardcodedText"
+ />
</LinearLayout>
- <View
- android:id="@+id/transaction_row_header_border"
- android:layout_width="match_parent"
- android:layout_height="2dp"
- android:alpha="0.3"
- android:background="@drawable/dashed_border_1dp"
- android:height="2dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/transaction_row_head" />
-
<LinearLayout
android:id="@+id/transaction_row_acc_amounts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
android:layout_weight="5"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/transaction_row_header_border">
+ app:layout_constraintTop_toBottomOf="@+id/transaction_row_head"
+ >
- <include layout="@layout/transaction_list_row_accounts_table_row"/>
- <include layout="@layout/transaction_list_row_accounts_table_row"/>
+ <include layout="@layout/transaction_list_row_accounts_table_row" />
+ <include layout="@layout/transaction_list_row_accounts_table_row" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
- </androidx.cardview.widget.CardView>
+ </com.google.android.material.card.MaterialCardView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/transaction_delimiter"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
- android:layout_marginEnd="8dp">
+ android:layout_marginEnd="8dp"
+ >
<TextView
android:id="@+id/transaction_delimiter_month"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:background="?colorPrimary"
- android:paddingStart="4dp"
- android:paddingEnd="4dp"
+ android:layout_marginHorizontal="4dp"
android:text="---------"
- android:textColor="@android:color/white"
+ android:textColor="?colorPrimary"
android:textStyle="bold"
- app:layout_constraintStart_toStartOf="parent"
- tools:ignore="HardcodedText" />
+ app:layout_constraintEnd_toEndOf="parent"
+ tools:ignore="HardcodedText"
+ />
<TextView
android:id="@+id/transaction_delimiter_date"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:background="?colorPrimary"
- android:paddingStart="4dp"
- android:paddingEnd="4dp"
+ android:layout_marginHorizontal="4dp"
android:text="--.--.----"
- android:textColor="@android:color/white"
+ android:textColor="?colorPrimary"
android:textStyle="bold"
- app:layout_constraintEnd_toEndOf="parent"
- tools:ignore="HardcodedText" />
-
- <View
- android:id="@+id/transaction_delimiter_line"
- android:layout_width="0dp"
- android:layout_height="16dp"
- android:layout_marginStart="8dp"
- android:layout_marginEnd="8dp"
- android:alpha="0.3"
- android:background="@drawable/dashed_border_1dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
- app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintStart_toStartOf="parent"
+ tools:ignore="HardcodedText"
+ />
<View
android:id="@+id/transaction_delimiter_thick"
android:layout_width="0dp"
- android:layout_height="0dp"
+ android:layout_height="1dp"
+ android:layout_marginHorizontal="16dp"
android:background="?colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
- app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_month"
+ app:layout_constraintStart_toEndOf="@id/transaction_delimiter_date"
+ app:layout_constraintTop_toTopOf="parent"
+ />
</androidx.constraintlayout.widget.ConstraintLayout>