]> git.ktnx.net Git - mobile-ledger-staging.git/blob - app/src/main/res/layout/transaction_list_row.xml
restore transaction list card margins, default elevation
[mobile-ledger-staging.git] / app / src / main / res / layout / transaction_list_row.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   ~ Copyright © 2020 Damyan Ivanov.
5   ~ This file is part of MoLe.
6   ~ MoLe is free software: you can distribute it and/or modify it
7   ~ under the term of the GNU General Public License as published by
8   ~ the Free Software Foundation, either version 3 of the License, or
9   ~ (at your opinion), any later version.
10   ~
11   ~ MoLe is distributed in the hope that it will be useful,
12   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
13   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   ~ GNU General Public License terms for details.
15   ~
16   ~ You should have received a copy of the GNU General Public License
17   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
18   -->
19
20 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
21     xmlns:app="http://schemas.android.com/apk/res-auto"
22     xmlns:tools="http://schemas.android.com/tools"
23     android:layout_width="match_parent"
24     android:layout_height="wrap_content"
25     android:measureAllChildren="false"
26     >
27
28     <com.google.android.material.card.MaterialCardView
29         android:id="@+id/transaction_card_view"
30         style="@style/Widget.MaterialComponents.CardView"
31         android:layout_width="match_parent"
32         android:layout_height="wrap_content"
33         android:layout_margin="8dp"
34         android:visibility="visible"
35         app:cardCornerRadius="4dp"
36         app:cardUseCompatPadding="false"
37         >
38
39         <androidx.constraintlayout.widget.ConstraintLayout
40             android:id="@+id/transaction_row"
41             android:layout_width="match_parent"
42             android:layout_height="wrap_content"
43             android:gravity="center_vertical"
44             android:minHeight="36dp"
45             android:orientation="horizontal"
46             android:padding="8dp"
47             >
48
49             <LinearLayout
50                 android:id="@+id/transaction_row_head"
51                 android:layout_width="match_parent"
52                 android:layout_height="wrap_content"
53                 android:orientation="vertical"
54                 app:layout_constraintEnd_toEndOf="parent"
55                 app:layout_constraintStart_toStartOf="parent"
56                 app:layout_constraintTop_toTopOf="parent"
57                 >
58
59                 <TextView
60                     android:id="@+id/transaction_row_description"
61                     style="@style/account_summary_account_name"
62                     android:layout_width="match_parent"
63                     android:layout_height="wrap_content"
64                     android:text="---."
65                     android:textAppearance="@android:style/TextAppearance.Material.Medium"
66                     tools:ignore="HardcodedText"
67                     />
68                 <TextView
69                     android:id="@+id/transaction_comment"
70                     android:layout_width="match_parent"
71                     android:layout_height="wrap_content"
72                     android:layout_marginStart="8dp"
73                     android:text="Comment text"
74                     android:textStyle="italic"
75                     tools:ignore="HardcodedText"
76                     />
77             </LinearLayout>
78
79             <LinearLayout
80                 android:id="@+id/transaction_row_acc_amounts"
81                 android:layout_width="match_parent"
82                 android:layout_height="wrap_content"
83                 android:layout_marginTop="8dp"
84                 android:layout_weight="5"
85                 android:orientation="vertical"
86                 app:layout_constraintEnd_toEndOf="parent"
87                 app:layout_constraintStart_toStartOf="parent"
88                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_head"
89                 >
90
91                 <include layout="@layout/transaction_list_row_accounts_table_row" />
92                 <include layout="@layout/transaction_list_row_accounts_table_row" />
93
94             </LinearLayout>
95
96         </androidx.constraintlayout.widget.ConstraintLayout>
97     </com.google.android.material.card.MaterialCardView>
98
99     <androidx.constraintlayout.widget.ConstraintLayout
100         android:id="@+id/transaction_delimiter"
101         android:layout_width="match_parent"
102         android:layout_height="wrap_content"
103         android:layout_marginStart="8dp"
104         android:layout_marginTop="16dp"
105         android:layout_marginEnd="8dp"
106         >
107
108         <TextView
109             android:id="@+id/transaction_delimiter_month"
110             android:layout_width="wrap_content"
111             android:layout_height="match_parent"
112             android:layout_marginHorizontal="4dp"
113             android:text="---------"
114             android:textColor="?colorPrimary"
115             android:textStyle="bold"
116             app:layout_constraintEnd_toEndOf="parent"
117             tools:ignore="HardcodedText"
118             />
119
120         <TextView
121             android:id="@+id/transaction_delimiter_date"
122             android:layout_width="wrap_content"
123             android:layout_height="match_parent"
124             android:layout_marginHorizontal="4dp"
125             android:text="--.--.----"
126             android:textColor="?colorPrimary"
127             android:textStyle="bold"
128             app:layout_constraintStart_toStartOf="parent"
129             tools:ignore="HardcodedText"
130             />
131
132         <View
133             android:id="@+id/transaction_delimiter_thick"
134             android:layout_width="0dp"
135             android:layout_height="1dp"
136             android:layout_marginHorizontal="16dp"
137             android:background="?colorPrimary"
138             app:layout_constraintBottom_toBottomOf="parent"
139             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_month"
140             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_date"
141             app:layout_constraintTop_toTopOf="parent"
142             />
143
144     </androidx.constraintlayout.widget.ConstraintLayout>
145
146 </FrameLayout>