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/pattern_name"
35 android:layout_width="match_parent"
36 android:layout_height="wrap_content"
37 android:hint="@string/pattern_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:layout_constraintEnd_toEndOf="parent"
47 app:layout_constraintStart_toStartOf="parent"
48 app:layout_constraintTop_toBottomOf="@id/pattern_name_layout"
50 <com.google.android.material.textfield.TextInputEditText
51 android:id="@+id/pattern"
52 android:layout_width="match_parent"
53 android:layout_height="wrap_content"
54 android:hint="@string/pattern_details_pattern_label"
55 android:inputType="text"
57 </com.google.android.material.textfield.TextInputLayout>
58 <com.google.android.material.textfield.TextInputLayout
59 android:id="@+id/test_text_layout"
60 android:layout_width="0dp"
61 android:layout_height="wrap_content"
62 android:textAppearance="?attr/textAppearanceListItem"
63 app:layout_constraintEnd_toStartOf="@id/pattern_details_head_scan_qr_button"
64 app:layout_constraintStart_toStartOf="parent"
65 app:layout_constraintTop_toBottomOf="@id/pattern_layout"
67 <com.google.android.material.textfield.TextInputEditText
68 android:id="@+id/test_text"
69 android:layout_width="match_parent"
70 android:layout_height="wrap_content"
71 android:hint="@string/pattern_details_test_text_label"
72 android:inputType="text"
74 </com.google.android.material.textfield.TextInputLayout>
76 android:id="@+id/pattern_details_head_scan_qr_button"
77 android:layout_width="wrap_content"
78 android:layout_height="0dp"
79 android:background="@android:color/transparent"
80 android:contentDescription="@string/scan_qr"
81 android:minWidth="@dimen/thumb_row_height"
82 app:layout_constraintBottom_toBottomOf="@id/test_text_layout"
83 app:layout_constraintEnd_toEndOf="parent"
84 app:layout_constraintTop_toTopOf="@id/test_text_layout"
85 app:srcCompat="@drawable/ic_baseline_qr_code_scanner_24"
86 app:tint="?colorPrimary"
89 android:id="@+id/transaction_parameters_label"
90 android:layout_width="match_parent"
91 android:layout_height="wrap_content"
93 android:paddingTop="@dimen/text_margin"
94 android:text="@string/pattern_transaction_parameters_label"
95 app:layout_constraintTop_toBottomOf="@id/test_text_layout"
98 android:id="@+id/pattern_transaction_date_label"
99 android:layout_width="match_parent"
100 android:layout_height="wrap_content"
101 android:text="@string/pattern_details_date_label"
102 app:layout_constraintTop_toBottomOf="@id/transaction_parameters_label"
105 android:id="@+id/pattern_details_year_source_label"
106 android:layout_width="0dp"
107 android:layout_height="wrap_content"
108 android:text="@string/pattern_details_date_year_source_label"
109 android:textAlignment="center"
110 app:layout_constraintEnd_toStartOf="@id/pattern_details_month_source_label"
111 app:layout_constraintStart_toStartOf="parent"
112 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
115 android:id="@+id/pattern_details_month_source_label"
116 android:layout_width="0dp"
117 android:layout_height="wrap_content"
118 android:text="@string/pattern_details_date_month_source_label"
119 android:textAlignment="center"
120 app:layout_constraintEnd_toStartOf="@id/pattern_details_day_source_label"
121 app:layout_constraintStart_toEndOf="@id/pattern_details_year_source_label"
122 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
125 android:id="@+id/pattern_details_day_source_label"
126 android:layout_width="0dp"
127 android:layout_height="wrap_content"
128 android:text="@string/pattern_details_date_day_source_label"
129 android:textAlignment="center"
130 app:layout_constraintEnd_toEndOf="parent"
131 app:layout_constraintStart_toEndOf="@id/pattern_details_month_source_label"
132 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
135 android:id="@+id/pattern_details_year_source"
136 android:layout_width="0dp"
137 android:layout_height="wrap_content"
138 android:text="literal"
139 android:textAlignment="center"
140 app:layout_constraintEnd_toStartOf="@id/pattern_details_month_source"
141 app:layout_constraintStart_toStartOf="parent"
142 app:layout_constraintTop_toBottomOf="@id/pattern_details_day_source_label"
145 android:id="@+id/pattern_details_month_source"
146 android:layout_width="0dp"
147 android:layout_height="wrap_content"
149 android:textAlignment="center"
150 app:layout_constraintEnd_toStartOf="@id/pattern_details_day_source"
151 app:layout_constraintStart_toEndOf="@id/pattern_details_year_source"
152 app:layout_constraintTop_toBottomOf="@id/pattern_details_month_source_label"
155 android:id="@+id/pattern_details_day_source"
156 android:layout_width="0dp"
157 android:layout_height="wrap_content"
159 android:textAlignment="center"
160 app:layout_constraintEnd_toEndOf="parent"
161 app:layout_constraintStart_toEndOf="@id/pattern_details_month_source"
162 app:layout_constraintTop_toBottomOf="@id/pattern_details_day_source_label"
164 <androidx.constraintlayout.widget.Barrier
165 android:id="@+id/barrier_before_date_inputs"
166 android:layout_width="match_parent"
167 android:layout_height="wrap_content"
168 app:barrierDirection="bottom"
169 app:constraint_referenced_ids="pattern_details_year_source,pattern_details_month_source,pattern_details_day_source"
171 <com.google.android.material.textfield.TextInputLayout
172 android:id="@+id/pattern_details_date_year_layout"
173 android:layout_width="0dp"
174 android:layout_height="wrap_content"
175 app:layout_constraintEnd_toStartOf="@id/pattern_details_date_month_layout"
176 app:layout_constraintStart_toStartOf="parent"
177 app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
179 <com.google.android.material.textfield.TextInputEditText
180 android:id="@+id/pattern_details_date_year"
181 android:layout_width="match_parent"
182 android:layout_height="wrap_content"
183 android:gravity="center_horizontal"
184 android:hint="@string/date_year_hint"
186 </com.google.android.material.textfield.TextInputLayout>
187 <com.google.android.material.textfield.TextInputLayout
188 android:id="@+id/pattern_details_date_month_layout"
189 android:layout_width="0dp"
190 android:layout_height="wrap_content"
191 app:layout_constraintEnd_toStartOf="@id/pattern_details_date_day_layout"
192 app:layout_constraintStart_toEndOf="@id/pattern_details_date_year_layout"
193 app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
195 <com.google.android.material.textfield.TextInputEditText
196 android:id="@+id/pattern_details_date_month"
197 android:layout_width="match_parent"
198 android:layout_height="wrap_content"
199 android:gravity="center_horizontal"
200 android:hint="@string/date_month_hint"
202 </com.google.android.material.textfield.TextInputLayout>
203 <com.google.android.material.textfield.TextInputLayout
204 android:id="@+id/pattern_details_date_day_layout"
205 android:layout_width="0dp"
206 android:layout_height="wrap_content"
207 app:layout_constraintBottom_toTopOf="@id/barrier_before_description"
208 app:layout_constraintEnd_toEndOf="parent"
209 app:layout_constraintStart_toEndOf="@id/pattern_details_date_month_layout"
210 app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
212 <com.google.android.material.textfield.TextInputEditText
213 android:id="@+id/pattern_details_date_day"
214 android:layout_width="match_parent"
215 android:layout_height="wrap_content"
216 android:gravity="center_horizontal"
217 android:hint="@string/date_day_hint"
219 </com.google.android.material.textfield.TextInputLayout>
220 <androidx.constraintlayout.widget.Barrier
221 android:id="@+id/barrier_before_description"
222 android:layout_width="match_parent"
223 android:layout_height="wrap_content"
224 android:orientation="horizontal"
225 app:barrierDirection="bottom"
226 app:constraint_referenced_ids="pattern_details_date_day_layout,pattern_details_date_month_layout,pattern_details_date_year_layout"
227 app:layout_constraintEnd_toEndOf="parent"
228 app:layout_constraintStart_toStartOf="parent"
231 android:id="@+id/pattern_transaction_description_source_label"
232 android:layout_width="0dp"
233 android:layout_height="match_parent"
234 android:paddingTop="@dimen/text_margin"
235 android:text="@string/transaction_description_source_label"
236 android:textAppearance="?attr/textAppearanceListItem"
237 app:layout_constraintEnd_toEndOf="parent"
238 app:layout_constraintStart_toStartOf="parent"
239 app:layout_constraintTop_toBottomOf="@id/barrier_before_description"
242 android:id="@+id/pattern_transaction_description_source"
243 android:layout_width="0dp"
244 android:layout_height="wrap_content"
245 android:minWidth="100dp"
246 android:textAppearance="?attr/textAppearanceListItemSecondary"
247 app:layout_constraintEnd_toEndOf="parent"
248 app:layout_constraintStart_toStartOf="parent"
249 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_description_source_label"
251 <com.google.android.material.textfield.TextInputLayout
252 android:id="@+id/transaction_description_layout"
253 android:layout_width="match_parent"
254 android:layout_height="wrap_content"
255 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_description_source"
257 <com.google.android.material.textfield.TextInputEditText
258 android:id="@+id/transaction_description"
259 android:layout_width="match_parent"
260 android:layout_height="wrap_content"
261 android:hint="@string/pattern_transaction_description_hint"
263 </com.google.android.material.textfield.TextInputLayout>
265 android:id="@+id/pattern_transaction_comment_source_label"
266 android:layout_width="0dp"
267 android:layout_height="match_parent"
268 android:paddingTop="@dimen/text_margin"
269 android:text="@string/transaction_comment_source_label"
270 android:textAppearance="?attr/textAppearanceListItem"
271 app:layout_constraintEnd_toEndOf="parent"
272 app:layout_constraintStart_toStartOf="parent"
273 app:layout_constraintTop_toBottomOf="@id/transaction_description_layout"
276 android:id="@+id/pattern_transaction_comment_source"
277 android:layout_width="0dp"
278 android:layout_height="wrap_content"
279 android:minWidth="100dp"
280 android:textAppearance="?attr/textAppearanceListItemSecondary"
281 app:layout_constraintEnd_toEndOf="parent"
282 app:layout_constraintStart_toStartOf="parent"
283 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_comment_source_label"
285 <com.google.android.material.textfield.TextInputLayout
286 android:id="@+id/transaction_comment_layout"
287 android:layout_width="match_parent"
288 android:layout_height="wrap_content"
289 app:layout_constraintTop_toBottomOf="@id/pattern_transaction_comment_source"
291 <com.google.android.material.textfield.TextInputEditText
292 android:id="@+id/transaction_comment"
293 android:layout_width="match_parent"
294 android:layout_height="wrap_content"
295 android:hint="@string/pattern_transaction_comment_hint"
297 </com.google.android.material.textfield.TextInputLayout>
299 </androidx.constraintlayout.widget.ConstraintLayout>