1 <?xml version="1.0" encoding="utf-8"?><!--
2 ~ Copyright © 2021 Damyan Ivanov.
3 ~ This file is part of MoLe.
4 ~ MoLe is free software: you can distribute it and/or modify it
5 ~ under the term of the GNU General Public License as published by
6 ~ the Free Software Foundation, either version 3 of the License, or
7 ~ (at your opinion), any later version.
9 ~ MoLe is distributed in the hope that it will be useful,
10 ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ~ GNU General Public License terms for details.
14 ~ You should have received a copy of the GNU General Public License
15 ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
18 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
19 xmlns:app="http://schemas.android.com/apk/res-auto"
20 android:id="@+id/pattern_details_item_head"
21 android:layout_width="match_parent"
22 android:layout_height="wrap_content"
23 android:paddingHorizontal="@dimen/text_margin"
25 <com.google.android.material.textfield.TextInputLayout
26 android:id="@+id/pattern_name_layout"
27 android:layout_width="0dp"
28 android:layout_height="wrap_content"
29 app:layout_constraintEnd_toEndOf="parent"
30 app:layout_constraintStart_toStartOf="parent"
31 app:layout_constraintTop_toTopOf="parent"
33 <com.google.android.material.textfield.TextInputEditText
34 android:id="@+id/template_name"
35 android:layout_width="match_parent"
36 android:layout_height="wrap_content"
37 android:hint="@string/template_name_label"
38 android:inputType="text"
40 </com.google.android.material.textfield.TextInputLayout>
41 <com.google.android.material.textfield.TextInputLayout
42 android:id="@+id/pattern_layout"
43 android:layout_width="0dp"
44 android:layout_height="wrap_content"
45 android:textAppearance="?attr/textAppearanceListItem"
46 app:endIconMode="clear_text"
47 app:layout_constraintBottom_toTopOf="@id/pattern_hint_title"
48 app:layout_constraintEnd_toEndOf="parent"
49 app:layout_constraintStart_toStartOf="parent"
50 app:layout_constraintTop_toBottomOf="@id/pattern_name_layout"
52 <com.google.android.material.textfield.TextInputEditText
53 android:id="@+id/pattern"
54 android:layout_width="match_parent"
55 android:layout_height="wrap_content"
56 android:hint="@string/template_details_pattern_label"
57 android:inputType="text"
59 </com.google.android.material.textfield.TextInputLayout>
61 android:id="@+id/pattern_hint_title"
62 android:layout_width="0dp"
63 android:layout_height="wrap_content"
64 android:text="@string/pattern_match_result"
65 android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
66 app:layout_constraintBottom_toTopOf="@+id/pattern_hint_text"
67 app:layout_constraintEnd_toEndOf="parent"
68 app:layout_constraintStart_toStartOf="parent"
69 app:layout_constraintTop_toBottomOf="@id/pattern_layout"
72 android:id="@+id/pattern_hint_text"
73 android:layout_width="0dp"
74 android:layout_height="match_parent"
75 android:layout_marginBottom="@dimen/text_margin"
76 android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
77 app:layout_constraintBottom_toTopOf="@+id/test_text_layout"
78 app:layout_constraintEnd_toEndOf="parent"
79 app:layout_constraintStart_toStartOf="parent"
80 app:layout_constraintTop_toBottomOf="@id/pattern_hint_title"
82 <com.google.android.material.textfield.TextInputLayout
83 android:id="@+id/test_text_layout"
84 android:layout_width="0dp"
85 android:layout_height="wrap_content"
86 android:textAppearance="?attr/textAppearanceListItem"
87 app:layout_constraintEnd_toStartOf="@id/template_details_head_scan_qr_button"
88 app:layout_constraintStart_toStartOf="parent"
89 app:layout_constraintTop_toBottomOf="@id/pattern_hint_text"
91 <com.google.android.material.textfield.TextInputEditText
92 android:id="@+id/test_text"
93 android:layout_width="match_parent"
94 android:layout_height="wrap_content"
95 android:hint="@string/template_details_test_text_label"
96 android:inputType="text"
98 </com.google.android.material.textfield.TextInputLayout>
100 android:id="@+id/template_details_head_scan_qr_button"
101 android:layout_width="wrap_content"
102 android:layout_height="0dp"
103 android:background="@android:color/transparent"
104 android:contentDescription="@string/scan_qr"
105 android:minWidth="@dimen/thumb_row_height"
106 app:layout_constraintBottom_toBottomOf="@id/test_text_layout"
107 app:layout_constraintEnd_toEndOf="parent"
108 app:layout_constraintTop_toTopOf="@id/test_text_layout"
109 app:srcCompat="@drawable/ic_baseline_qr_code_scanner_24"
110 app:tint="?colorPrimary"
113 android:id="@+id/transaction_parameters_label"
114 android:layout_width="match_parent"
115 android:layout_height="wrap_content"
116 android:gravity="end"
117 android:paddingTop="@dimen/text_margin"
118 android:text="@string/template_transaction_parameters_label"
119 app:layout_constraintTop_toBottomOf="@id/test_text_layout"
122 android:id="@+id/pattern_transaction_date_label"
123 android:layout_width="match_parent"
124 android:layout_height="wrap_content"
125 android:text="@string/template_details_date_label"
126 app:layout_constraintTop_toBottomOf="@id/transaction_parameters_label"
129 android:id="@+id/template_details_year_source_label"
130 android:layout_width="0dp"
131 android:layout_height="wrap_content"
132 android:text="@string/template_details_date_year_source_label"
133 android:textAlignment="center"
134 app:layout_constraintEnd_toStartOf="@id/template_details_month_source_label"
135 app:layout_constraintStart_toStartOf="parent"
136 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
139 android:id="@+id/template_details_month_source_label"
140 android:layout_width="0dp"
141 android:layout_height="wrap_content"
142 android:text="@string/template_details_date_month_source_label"
143 android:textAlignment="center"
144 app:layout_constraintEnd_toStartOf="@id/template_details_day_source_label"
145 app:layout_constraintStart_toEndOf="@id/template_details_year_source_label"
146 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
149 android:id="@+id/template_details_day_source_label"
150 android:layout_width="0dp"
151 android:layout_height="wrap_content"
152 android:text="@string/template_details_date_day_source_label"
153 android:textAlignment="center"
154 app:layout_constraintEnd_toEndOf="parent"
155 app:layout_constraintStart_toEndOf="@id/template_details_month_source_label"
156 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
159 android:id="@+id/template_details_year_source"
160 android:layout_width="0dp"
161 android:layout_height="wrap_content"
162 android:text="@string/template_details_source_literal"
163 android:textAlignment="center"
164 app:layout_constraintEnd_toStartOf="@id/template_details_month_source"
165 app:layout_constraintStart_toStartOf="parent"
166 app:layout_constraintTop_toBottomOf="@id/template_details_day_source_label"
169 android:id="@+id/template_details_month_source"
170 android:layout_width="0dp"
171 android:layout_height="wrap_content"
173 android:textAlignment="center"
174 app:layout_constraintEnd_toStartOf="@id/template_details_day_source"
175 app:layout_constraintStart_toEndOf="@id/template_details_year_source"
176 app:layout_constraintTop_toBottomOf="@id/template_details_month_source_label"
179 android:id="@+id/template_details_day_source"
180 android:layout_width="0dp"
181 android:layout_height="wrap_content"
183 android:textAlignment="center"
184 app:layout_constraintEnd_toEndOf="parent"
185 app:layout_constraintStart_toEndOf="@id/template_details_month_source"
186 app:layout_constraintTop_toBottomOf="@id/template_details_day_source_label"
188 <androidx.constraintlayout.widget.Barrier
189 android:id="@+id/barrier_before_date_inputs"
190 android:layout_width="match_parent"
191 android:layout_height="wrap_content"
192 app:barrierDirection="bottom"
193 app:constraint_referenced_ids="template_details_year_source,template_details_month_source,template_details_day_source"
195 <com.google.android.material.textfield.TextInputLayout
196 android:id="@+id/template_details_date_year_layout"
197 android:layout_width="0dp"
198 android:layout_height="wrap_content"
199 app:layout_constraintEnd_toEndOf="@id/template_details_year_source"
200 app:layout_constraintStart_toStartOf="parent"
201 app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
203 <com.google.android.material.textfield.TextInputEditText
204 android:id="@+id/template_details_date_year"
205 android:layout_width="match_parent"
206 android:layout_height="wrap_content"
207 android:gravity="center_horizontal"
208 android:hint="@string/date_year_hint"
209 android:inputType="number"
211 </com.google.android.material.textfield.TextInputLayout>
212 <com.google.android.material.textfield.TextInputLayout
213 android:id="@+id/template_details_date_month_layout"
214 android:layout_width="0dp"
215 android:layout_height="wrap_content"
216 app:layout_constraintEnd_toEndOf="@id/template_details_month_source"
217 app:layout_constraintStart_toStartOf="@id/template_details_month_source"
218 app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
220 <com.google.android.material.textfield.TextInputEditText
221 android:id="@+id/template_details_date_month"
222 android:layout_width="match_parent"
223 android:layout_height="wrap_content"
224 android:gravity="center_horizontal"
225 android:hint="@string/date_month_hint"
226 android:inputType="number"
228 </com.google.android.material.textfield.TextInputLayout>
229 <com.google.android.material.textfield.TextInputLayout
230 android:id="@+id/template_details_date_day_layout"
231 android:layout_width="0dp"
232 android:layout_height="wrap_content"
233 app:layout_constraintBottom_toTopOf="@id/barrier_before_description"
234 app:layout_constraintEnd_toEndOf="parent"
235 app:layout_constraintStart_toStartOf="@id/template_details_day_source"
236 app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
238 <com.google.android.material.textfield.TextInputEditText
239 android:id="@+id/template_details_date_day"
240 android:layout_width="match_parent"
241 android:layout_height="wrap_content"
242 android:gravity="center_horizontal"
243 android:hint="@string/date_day_hint"
244 android:inputType="number"
246 </com.google.android.material.textfield.TextInputLayout>
247 <androidx.constraintlayout.widget.Barrier
248 android:id="@+id/barrier_before_description"
249 android:layout_width="match_parent"
250 android:layout_height="wrap_content"
251 android:orientation="horizontal"
252 app:barrierDirection="bottom"
253 app:constraint_referenced_ids="template_details_date_day_layout,template_details_date_month_layout,template_details_date_year_layout"
254 app:layout_constraintEnd_toEndOf="parent"
255 app:layout_constraintStart_toStartOf="parent"
258 android:id="@+id/template_transaction_description_source_label"
259 android:layout_width="0dp"
260 android:layout_height="match_parent"
261 android:paddingTop="@dimen/text_margin"
262 android:text="@string/transaction_description_source_label"
263 android:textAppearance="?attr/textAppearanceListItem"
264 app:layout_constraintEnd_toEndOf="parent"
265 app:layout_constraintStart_toStartOf="parent"
266 app:layout_constraintTop_toBottomOf="@id/barrier_before_description"
269 android:id="@+id/template_transaction_description_source"
270 android:layout_width="0dp"
271 android:layout_height="wrap_content"
272 android:minWidth="100dp"
273 android:textAppearance="?attr/textAppearanceListItemSecondary"
274 app:layout_constraintEnd_toEndOf="parent"
275 app:layout_constraintStart_toStartOf="parent"
276 app:layout_constraintTop_toBottomOf="@id/template_transaction_description_source_label"
278 <com.google.android.material.textfield.TextInputLayout
279 android:id="@+id/transaction_description_layout"
280 android:layout_width="match_parent"
281 android:layout_height="wrap_content"
282 app:layout_constraintTop_toBottomOf="@id/template_transaction_description_source"
284 <com.google.android.material.textfield.TextInputEditText
285 android:id="@+id/transaction_description"
286 android:layout_width="match_parent"
287 android:layout_height="wrap_content"
288 android:hint="@string/template_transaction_description_hint"
290 </com.google.android.material.textfield.TextInputLayout>
292 android:id="@+id/template_transaction_comment_source_label"
293 android:layout_width="0dp"
294 android:layout_height="match_parent"
295 android:paddingTop="@dimen/text_margin"
296 android:text="@string/transaction_comment_source_label"
297 android:textAppearance="?attr/textAppearanceListItem"
298 app:layout_constraintEnd_toEndOf="parent"
299 app:layout_constraintStart_toStartOf="parent"
300 app:layout_constraintTop_toBottomOf="@id/transaction_description_layout"
303 android:id="@+id/template_transaction_comment_source"
304 android:layout_width="0dp"
305 android:layout_height="wrap_content"
306 android:minWidth="100dp"
307 android:textAppearance="?attr/textAppearanceListItemSecondary"
308 app:layout_constraintEnd_toEndOf="parent"
309 app:layout_constraintStart_toStartOf="parent"
310 app:layout_constraintTop_toBottomOf="@id/template_transaction_comment_source_label"
312 <com.google.android.material.textfield.TextInputLayout
313 android:id="@+id/transaction_comment_layout"
314 android:layout_width="match_parent"
315 android:layout_height="wrap_content"
316 app:layout_constraintTop_toBottomOf="@id/template_transaction_comment_source"
318 <com.google.android.material.textfield.TextInputEditText
319 android:id="@+id/transaction_comment"
320 android:layout_width="match_parent"
321 android:layout_height="wrap_content"
322 android:hint="@string/template_transaction_comment_hint"
324 </com.google.android.material.textfield.TextInputLayout>
326 </androidx.constraintlayout.widget.ConstraintLayout>