]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/template_details_header.xml
58b5535f1101fd8e5caf082ddfabdfd64db5e919
[mobile-ledger.git] / app / src / main / res / layout / template_details_header.xml
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.
8   ~
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.
13   ~
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/>.
16   -->
17
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"
24     >
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"
32         >
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"
39             />
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"
51         >
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"
58             />
59     </com.google.android.material.textfield.TextInputLayout>
60     <TextView
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"
70         />
71     <TextView
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"
81         />
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"
90         >
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"
97             />
98     </com.google.android.material.textfield.TextInputLayout>
99     <ImageButton
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"
111         />
112     <TextView
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"
120         />
121     <TextView
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"
127         />
128     <TextView
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"
137         />
138     <TextView
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"
147         />
148     <TextView
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"
157         />
158     <TextView
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"
167         />
168     <TextView
169         android:id="@+id/template_details_month_source"
170         android:layout_width="0dp"
171         android:layout_height="wrap_content"
172         android:text=""
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"
177         />
178     <TextView
179         android:id="@+id/template_details_day_source"
180         android:layout_width="0dp"
181         android:layout_height="wrap_content"
182         android:text=""
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"
187         />
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"
194         />
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"
202         >
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             />
210     </com.google.android.material.textfield.TextInputLayout>
211     <com.google.android.material.textfield.TextInputLayout
212         android:id="@+id/template_details_date_month_layout"
213         android:layout_width="0dp"
214         android:layout_height="wrap_content"
215         app:layout_constraintEnd_toEndOf="@id/template_details_month_source"
216         app:layout_constraintStart_toStartOf="@id/template_details_month_source"
217         app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
218         >
219         <com.google.android.material.textfield.TextInputEditText
220             android:id="@+id/template_details_date_month"
221             android:layout_width="match_parent"
222             android:layout_height="wrap_content"
223             android:gravity="center_horizontal"
224             android:hint="@string/date_month_hint"
225             />
226     </com.google.android.material.textfield.TextInputLayout>
227     <com.google.android.material.textfield.TextInputLayout
228         android:id="@+id/template_details_date_day_layout"
229         android:layout_width="0dp"
230         android:layout_height="wrap_content"
231         app:layout_constraintBottom_toTopOf="@id/barrier_before_description"
232         app:layout_constraintEnd_toEndOf="parent"
233         app:layout_constraintStart_toStartOf="@id/template_details_day_source"
234         app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
235         >
236         <com.google.android.material.textfield.TextInputEditText
237             android:id="@+id/template_details_date_day"
238             android:layout_width="match_parent"
239             android:layout_height="wrap_content"
240             android:gravity="center_horizontal"
241             android:hint="@string/date_day_hint"
242             />
243     </com.google.android.material.textfield.TextInputLayout>
244     <androidx.constraintlayout.widget.Barrier
245         android:id="@+id/barrier_before_description"
246         android:layout_width="match_parent"
247         android:layout_height="wrap_content"
248         android:orientation="horizontal"
249         app:barrierDirection="bottom"
250         app:constraint_referenced_ids="template_details_date_day_layout,template_details_date_month_layout,template_details_date_year_layout"
251         app:layout_constraintEnd_toEndOf="parent"
252         app:layout_constraintStart_toStartOf="parent"
253         />
254     <TextView
255         android:id="@+id/template_transaction_description_source_label"
256         android:layout_width="0dp"
257         android:layout_height="match_parent"
258         android:paddingTop="@dimen/text_margin"
259         android:text="@string/transaction_description_source_label"
260         android:textAppearance="?attr/textAppearanceListItem"
261         app:layout_constraintEnd_toEndOf="parent"
262         app:layout_constraintStart_toStartOf="parent"
263         app:layout_constraintTop_toBottomOf="@id/barrier_before_description"
264         />
265     <TextView
266         android:id="@+id/template_transaction_description_source"
267         android:layout_width="0dp"
268         android:layout_height="wrap_content"
269         android:minWidth="100dp"
270         android:textAppearance="?attr/textAppearanceListItemSecondary"
271         app:layout_constraintEnd_toEndOf="parent"
272         app:layout_constraintStart_toStartOf="parent"
273         app:layout_constraintTop_toBottomOf="@id/template_transaction_description_source_label"
274         />
275     <com.google.android.material.textfield.TextInputLayout
276         android:id="@+id/transaction_description_layout"
277         android:layout_width="match_parent"
278         android:layout_height="wrap_content"
279         app:layout_constraintTop_toBottomOf="@id/template_transaction_description_source"
280         >
281         <com.google.android.material.textfield.TextInputEditText
282             android:id="@+id/transaction_description"
283             android:layout_width="match_parent"
284             android:layout_height="wrap_content"
285             android:hint="@string/template_transaction_description_hint"
286             />
287     </com.google.android.material.textfield.TextInputLayout>
288     <TextView
289         android:id="@+id/template_transaction_comment_source_label"
290         android:layout_width="0dp"
291         android:layout_height="match_parent"
292         android:paddingTop="@dimen/text_margin"
293         android:text="@string/transaction_comment_source_label"
294         android:textAppearance="?attr/textAppearanceListItem"
295         app:layout_constraintEnd_toEndOf="parent"
296         app:layout_constraintStart_toStartOf="parent"
297         app:layout_constraintTop_toBottomOf="@id/transaction_description_layout"
298         />
299     <TextView
300         android:id="@+id/template_transaction_comment_source"
301         android:layout_width="0dp"
302         android:layout_height="wrap_content"
303         android:minWidth="100dp"
304         android:textAppearance="?attr/textAppearanceListItemSecondary"
305         app:layout_constraintEnd_toEndOf="parent"
306         app:layout_constraintStart_toStartOf="parent"
307         app:layout_constraintTop_toBottomOf="@id/template_transaction_comment_source_label"
308         />
309     <com.google.android.material.textfield.TextInputLayout
310         android:id="@+id/transaction_comment_layout"
311         android:layout_width="match_parent"
312         android:layout_height="wrap_content"
313         app:layout_constraintTop_toBottomOf="@id/template_transaction_comment_source"
314         >
315         <com.google.android.material.textfield.TextInputEditText
316             android:id="@+id/transaction_comment"
317             android:layout_width="match_parent"
318             android:layout_height="wrap_content"
319             android:hint="@string/template_transaction_comment_hint"
320             />
321     </com.google.android.material.textfield.TextInputLayout>
322
323 </androidx.constraintlayout.widget.ConstraintLayout>