migrate to AndroidX
[mobile-ledger.git] / app / src / main / res / layout / transaction_list_row.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   ~ Copyright © 2019 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 <androidx.appcompat.widget.ContentFrameLayout 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
26     <androidx.cardview.widget.CardView
27         android:id="@+id/transaction_card_view"
28         android:layout_width="match_parent"
29         android:layout_height="wrap_content"
30         android:layout_margin="8dp"
31         android:visibility="gone"
32         app:cardCornerRadius="16dp"
33         app:cardElevation="4dp"
34         app:cardUseCompatPadding="false"
35         app:layout_constraintEnd_toEndOf="parent"
36         app:layout_constraintStart_toStartOf="parent"
37         app:layout_goneMarginBottom="8dp">
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             <LinearLayout
49                 android:id="@+id/transaction_row_head"
50                 android:layout_width="match_parent"
51                 android:layout_height="wrap_content"
52                 android:orientation="horizontal"
53                 app:layout_constraintEnd_toEndOf="parent"
54                 app:layout_constraintStart_toStartOf="parent"
55                 app:layout_constraintTop_toTopOf="parent">
56
57                 <TextView
58                     android:id="@+id/transaction_row_description"
59                     style="@style/account_summary_account_name"
60                     android:layout_width="0dp"
61                     android:layout_height="wrap_content"
62                     android:layout_weight="5"
63                     android:text="---."
64                     android:textStyle="bold"
65                     tools:ignore="HardcodedText" />
66
67             </LinearLayout>
68
69             <LinearLayout
70                 android:id="@+id/transaction_row_header_border"
71                 android:layout_width="match_parent"
72                 android:layout_height="wrap_content"
73                 android:background="@drawable/dashed_border_1dp"
74                 android:alpha="0.3"
75                 android:minHeight="2dp"
76                 android:orientation="horizontal"
77                 app:layout_constraintEnd_toEndOf="parent"
78                 app:layout_constraintStart_toStartOf="parent"
79                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_head" />
80
81             <LinearLayout
82                 android:id="@+id/transaction_row_acc_amounts"
83                 android:layout_width="match_parent"
84                 android:layout_height="wrap_content"
85                 android:layout_weight="5"
86                 android:orientation="vertical"
87                 app:layout_constraintEnd_toEndOf="parent"
88                 app:layout_constraintStart_toStartOf="parent"
89                 app:layout_constraintTop_toBottomOf="@+id/transaction_row_header_border">
90
91                 <LinearLayout
92                     android:layout_width="match_parent"
93                     android:layout_height="wrap_content"
94                     android:gravity="center_vertical"
95                     android:orientation="horizontal"
96                     android:paddingStart="8dp"
97                     android:paddingEnd="0dp">
98
99                     <TextView
100                         android:layout_width="0dp"
101                         android:layout_height="wrap_content"
102                         android:layout_weight="5"
103                         android:text="---"
104                         android:textAlignment="viewStart"
105                         tools:ignore="HardcodedText" />
106
107                     <TextView
108                         android:layout_width="wrap_content"
109                         android:layout_height="wrap_content"
110                         android:layout_marginEnd="0dp"
111                         android:minWidth="60dp"
112                         android:text="€ --,--"
113                         android:textAlignment="viewEnd"
114                         tools:ignore="HardcodedText" />
115                 </LinearLayout>
116
117                 <LinearLayout
118                     android:layout_width="match_parent"
119                     android:layout_height="wrap_content"
120                     android:gravity="center_vertical"
121                     android:orientation="horizontal"
122                     android:paddingStart="8dp"
123                     android:paddingEnd="0dp">
124
125                     <TextView
126                         android:layout_width="0dp"
127                         android:layout_height="wrap_content"
128                         android:layout_weight="5"
129                         android:text="---"
130                         android:textAlignment="viewStart"
131                         tools:ignore="HardcodedText" />
132
133                     <TextView
134                         android:layout_width="wrap_content"
135                         android:layout_height="wrap_content"
136                         android:layout_marginEnd="0dp"
137                         android:minWidth="60dp"
138                         android:text="---,--"
139                         android:textAlignment="viewEnd"
140                         tools:ignore="HardcodedText" />
141                 </LinearLayout>
142             </LinearLayout>
143
144         </androidx.constraintlayout.widget.ConstraintLayout>
145     </androidx.cardview.widget.CardView>
146
147     <androidx.constraintlayout.widget.ConstraintLayout
148         android:id="@+id/transaction_delimiter"
149         android:layout_width="match_parent"
150         android:layout_height="wrap_content"
151         android:layout_marginStart="8dp"
152         android:layout_marginTop="16dp"
153         android:layout_marginEnd="8dp"
154         android:foregroundGravity="center_vertical"
155         android:orientation="horizontal">
156
157         <TextView
158             android:id="@+id/transaction_delimiter_month"
159             android:layout_width="wrap_content"
160             android:layout_height="match_parent"
161             android:background="?colorPrimary"
162             android:paddingStart="4dp"
163             android:paddingEnd="4dp"
164             android:text="---------"
165             android:textColor="@android:color/white"
166             android:textStyle="bold"
167             app:layout_constraintStart_toStartOf="parent"
168             tools:ignore="HardcodedText" />
169
170         <TextView
171             android:id="@+id/transaction_delimiter_date"
172             android:layout_width="wrap_content"
173             android:layout_height="match_parent"
174             android:background="?colorPrimary"
175             android:paddingStart="4dp"
176             android:paddingEnd="4dp"
177             android:text="--.--.----"
178             android:textColor="@android:color/white"
179             android:textStyle="bold"
180             app:layout_constraintEnd_toEndOf="parent"
181             tools:ignore="HardcodedText" />
182
183         <View
184             android:id="@+id/transaction_delimiter_line"
185             android:layout_width="0dp"
186             android:layout_height="16dp"
187             android:layout_marginStart="8dp"
188             android:layout_marginEnd="8dp"
189             android:background="@drawable/dashed_border_1dp"
190             android:alpha="0.3"
191             app:layout_constraintBottom_toBottomOf="parent"
192             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
193             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
194             app:layout_constraintTop_toTopOf="parent" />
195
196         <View
197             android:id="@+id/transaction_delimiter_thick"
198             android:layout_width="0dp"
199             android:layout_height="0dp"
200             android:background="?colorPrimary"
201             app:layout_constraintBottom_toBottomOf="parent"
202             app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
203             app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
204             app:layout_constraintTop_toTopOf="parent" />
205
206     </androidx.constraintlayout.widget.ConstraintLayout>
207
208     <view
209         android:id="@+id/transaction_list_trailer"
210         class="androidx.constraintlayout.widget.Placeholder"
211         id="@+id/view"
212         android:layout_width="match_parent"
213         android:layout_height="80dp" />
214 </androidx.appcompat.widget.ContentFrameLayout>