]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/template_details_header.xml
rename Patterns to Templates
[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:layout_constraintEnd_toEndOf="parent"
47         app:layout_constraintStart_toStartOf="parent"
48         app:layout_constraintTop_toBottomOf="@id/pattern_name_layout"
49         >
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/template_details_pattern_label"
55             android:inputType="text"
56             />
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/template_details_head_scan_qr_button"
64         app:layout_constraintStart_toStartOf="parent"
65         app:layout_constraintTop_toBottomOf="@id/pattern_layout"
66         >
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/template_details_test_text_label"
72             android:inputType="text"
73             />
74     </com.google.android.material.textfield.TextInputLayout>
75     <ImageButton
76         android:id="@+id/template_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"
87         />
88     <TextView
89         android:id="@+id/transaction_parameters_label"
90         android:layout_width="match_parent"
91         android:layout_height="wrap_content"
92         android:gravity="end"
93         android:paddingTop="@dimen/text_margin"
94         android:text="@string/template_transaction_parameters_label"
95         app:layout_constraintTop_toBottomOf="@id/test_text_layout"
96         />
97     <TextView
98         android:id="@+id/pattern_transaction_date_label"
99         android:layout_width="match_parent"
100         android:layout_height="wrap_content"
101         android:text="@string/template_details_date_label"
102         app:layout_constraintTop_toBottomOf="@id/transaction_parameters_label"
103         />
104     <TextView
105         android:id="@+id/template_details_year_source_label"
106         android:layout_width="0dp"
107         android:layout_height="wrap_content"
108         android:text="@string/template_details_date_year_source_label"
109         android:textAlignment="center"
110         app:layout_constraintEnd_toStartOf="@id/template_details_month_source_label"
111         app:layout_constraintStart_toStartOf="parent"
112         app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
113         />
114     <TextView
115         android:id="@+id/template_details_month_source_label"
116         android:layout_width="0dp"
117         android:layout_height="wrap_content"
118         android:text="@string/template_details_date_month_source_label"
119         android:textAlignment="center"
120         app:layout_constraintEnd_toStartOf="@id/template_details_day_source_label"
121         app:layout_constraintStart_toEndOf="@id/template_details_year_source_label"
122         app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
123         />
124     <TextView
125         android:id="@+id/template_details_day_source_label"
126         android:layout_width="0dp"
127         android:layout_height="wrap_content"
128         android:text="@string/template_details_date_day_source_label"
129         android:textAlignment="center"
130         app:layout_constraintEnd_toEndOf="parent"
131         app:layout_constraintStart_toEndOf="@id/template_details_month_source_label"
132         app:layout_constraintTop_toBottomOf="@id/pattern_transaction_date_label"
133         />
134     <TextView
135         android:id="@+id/template_details_year_source"
136         android:layout_width="0dp"
137         android:layout_height="wrap_content"
138         android:text="@string/template_details_source_literal"
139         android:textAlignment="center"
140         app:layout_constraintEnd_toStartOf="@id/template_details_month_source"
141         app:layout_constraintStart_toStartOf="parent"
142         app:layout_constraintTop_toBottomOf="@id/template_details_day_source_label"
143         />
144     <TextView
145         android:id="@+id/template_details_month_source"
146         android:layout_width="0dp"
147         android:layout_height="wrap_content"
148         android:text=""
149         android:textAlignment="center"
150         app:layout_constraintEnd_toStartOf="@id/template_details_day_source"
151         app:layout_constraintStart_toEndOf="@id/template_details_year_source"
152         app:layout_constraintTop_toBottomOf="@id/template_details_month_source_label"
153         />
154     <TextView
155         android:id="@+id/template_details_day_source"
156         android:layout_width="0dp"
157         android:layout_height="wrap_content"
158         android:text=""
159         android:textAlignment="center"
160         app:layout_constraintEnd_toEndOf="parent"
161         app:layout_constraintStart_toEndOf="@id/template_details_month_source"
162         app:layout_constraintTop_toBottomOf="@id/template_details_day_source_label"
163         />
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="template_details_year_source,template_details_month_source,template_details_day_source"
170         />
171     <com.google.android.material.textfield.TextInputLayout
172         android:id="@+id/template_details_date_year_layout"
173         android:layout_width="0dp"
174         android:layout_height="wrap_content"
175         app:layout_constraintEnd_toEndOf="@id/template_details_year_source"
176         app:layout_constraintStart_toStartOf="parent"
177         app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
178         >
179         <com.google.android.material.textfield.TextInputEditText
180             android:id="@+id/template_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"
185             />
186     </com.google.android.material.textfield.TextInputLayout>
187     <com.google.android.material.textfield.TextInputLayout
188         android:id="@+id/template_details_date_month_layout"
189         android:layout_width="0dp"
190         android:layout_height="wrap_content"
191         app:layout_constraintEnd_toEndOf="@id/template_details_month_source"
192         app:layout_constraintStart_toStartOf="@id/template_details_month_source"
193         app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
194         >
195         <com.google.android.material.textfield.TextInputEditText
196             android:id="@+id/template_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"
201             />
202     </com.google.android.material.textfield.TextInputLayout>
203     <com.google.android.material.textfield.TextInputLayout
204         android:id="@+id/template_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_toStartOf="@id/template_details_day_source"
210         app:layout_constraintTop_toBottomOf="@id/barrier_before_date_inputs"
211         >
212         <com.google.android.material.textfield.TextInputEditText
213             android:id="@+id/template_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"
218             />
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="template_details_date_day_layout,template_details_date_month_layout,template_details_date_year_layout"
227         app:layout_constraintEnd_toEndOf="parent"
228         app:layout_constraintStart_toStartOf="parent"
229         />
230     <TextView
231         android:id="@+id/template_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"
240         />
241     <TextView
242         android:id="@+id/template_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/template_transaction_description_source_label"
250         />
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/template_transaction_description_source"
256         >
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/template_transaction_description_hint"
262             />
263     </com.google.android.material.textfield.TextInputLayout>
264     <TextView
265         android:id="@+id/template_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"
274         />
275     <TextView
276         android:id="@+id/template_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/template_transaction_comment_source_label"
284         />
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/template_transaction_comment_source"
290         >
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/template_transaction_comment_hint"
296             />
297     </com.google.android.material.textfield.TextInputLayout>
298
299 </androidx.constraintlayout.widget.ConstraintLayout>