]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/template_details_account.xml
c8c5285f02b7cd60983c7ab5a1c5e7d5e8cd4212
[mobile-ledger.git] / app / src / main / res / layout / template_details_account.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_account_row"
21     android:layout_width="match_parent"
22     android:layout_height="wrap_content"
23     android:animateLayoutChanges="true"
24     android:paddingHorizontal="@dimen/text_margin"
25     >
26     <TextView
27         android:id="@+id/pattern_account_label"
28         android:layout_width="match_parent"
29         android:layout_height="match_parent"
30         android:gravity="end"
31         android:paddingTop="@dimen/text_margin"
32         android:text="@string/template_details_account_row_label"
33         android:textAppearance="?attr/textAppearanceListItem"
34         app:drawableBottomCompat="@drawable/dashed_border_8dp"
35         />
36     <TextView
37         android:id="@+id/template_account_name_source_label"
38         android:layout_width="0dp"
39         android:layout_height="match_parent"
40         android:paddingTop="@dimen/text_margin"
41         android:text="@string/account_name_source_label"
42         android:textAppearance="?attr/textAppearanceListItem"
43         app:layout_constraintBottom_toTopOf="@+id/template_details_account_name_source"
44         app:layout_constraintEnd_toEndOf="parent"
45         app:layout_constraintStart_toStartOf="parent"
46         app:layout_constraintTop_toBottomOf="@id/pattern_account_label"
47         />
48     <TextView
49         android:id="@+id/template_details_account_name_source"
50         android:layout_width="0dp"
51         android:layout_height="wrap_content"
52         android:minWidth="100dp"
53         android:textAppearance="?attr/textAppearanceListItemSecondary"
54         app:layout_constraintBottom_toTopOf="@+id/template_details_account_name_layout"
55         app:layout_constraintEnd_toEndOf="parent"
56         app:layout_constraintStart_toStartOf="parent"
57         app:layout_constraintTop_toBottomOf="@id/template_account_name_source_label"
58         />
59     <com.google.android.material.textfield.TextInputLayout
60         android:id="@+id/template_details_account_name_layout"
61         android:layout_width="match_parent"
62         android:layout_height="wrap_content"
63         android:layout_marginBottom="@dimen/text_margin"
64         android:textAppearance="?attr/textAppearanceListItem"
65         app:endIconMode="clear_text"
66         app:layout_constraintBottom_toTopOf="@+id/template_account_comment_source_label"
67         app:layout_constraintEnd_toEndOf="parent"
68         app:layout_constraintStart_toStartOf="parent"
69         app:layout_constraintTop_toBottomOf="@id/template_details_account_name_source"
70         >
71         <com.google.android.material.textfield.MaterialAutoCompleteTextView
72             android:id="@+id/template_details_account_name"
73             style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
74             android:layout_width="match_parent"
75             android:layout_height="wrap_content"
76             android:hint="@string/template_details_account_name_label"
77             android:inputType="text"
78             />
79     </com.google.android.material.textfield.TextInputLayout>
80
81     <TextView
82         android:id="@+id/template_account_comment_source_label"
83         android:layout_width="0dp"
84         android:layout_height="match_parent"
85         android:text="@string/account_comment_source_label"
86         android:textAppearance="?attr/textAppearanceListItem"
87         app:layout_constraintBottom_toTopOf="@+id/template_details_account_comment_source"
88         app:layout_constraintEnd_toEndOf="parent"
89         app:layout_constraintStart_toStartOf="parent"
90         app:layout_constraintTop_toBottomOf="@id/template_details_account_name_layout"
91         />
92     <TextView
93         android:id="@+id/template_details_account_comment_source"
94         android:layout_width="0dp"
95         android:layout_height="wrap_content"
96         android:minWidth="100dp"
97         android:textAppearance="?attr/textAppearanceListItemSecondary"
98         app:layout_constraintBottom_toTopOf="@+id/template_details_account_comment_layout"
99         app:layout_constraintEnd_toEndOf="parent"
100         app:layout_constraintStart_toStartOf="parent"
101         app:layout_constraintTop_toBottomOf="@id/template_account_comment_source_label"
102         />
103     <com.google.android.material.textfield.TextInputLayout
104         android:id="@+id/template_details_account_comment_layout"
105         android:layout_width="match_parent"
106         android:layout_height="wrap_content"
107         android:layout_marginBottom="@dimen/text_margin"
108         android:textAppearance="?attr/textAppearanceListItem"
109         app:endIconMode="clear_text"
110         app:layout_constraintBottom_toTopOf="@+id/template_account_amount_source_label"
111         app:layout_constraintEnd_toEndOf="parent"
112         app:layout_constraintStart_toStartOf="parent"
113         app:layout_constraintTop_toBottomOf="@id/template_details_account_comment_source"
114         >
115         <com.google.android.material.textfield.TextInputEditText
116             android:id="@+id/template_details_account_comment"
117             android:layout_width="match_parent"
118             android:layout_height="wrap_content"
119             android:hint="@string/template_details_account_comment_label"
120             android:inputType="text"
121             />
122     </com.google.android.material.textfield.TextInputLayout>
123
124     <TextView
125         android:id="@+id/template_account_amount_source_label"
126         android:layout_width="0dp"
127         android:layout_height="match_parent"
128         android:text="@string/account_amount_source_label"
129         android:textAppearance="?attr/textAppearanceListItem"
130         app:layout_constraintBottom_toTopOf="@+id/template_details_account_amount_source"
131         app:layout_constraintEnd_toStartOf="@id/negate_amount_switch"
132         app:layout_constraintStart_toStartOf="parent"
133         app:layout_constraintTop_toBottomOf="@id/template_details_account_comment_layout"
134         />
135     <TextView
136         android:id="@+id/template_details_account_amount_source"
137         android:layout_width="0dp"
138         android:layout_height="wrap_content"
139         android:textAppearance="?attr/textAppearanceListItemSecondary"
140         app:layout_constraintBottom_toTopOf="@+id/template_details_account_amount_layout"
141         app:layout_constraintEnd_toStartOf="@id/negate_amount_switch"
142         app:layout_constraintStart_toStartOf="parent"
143         app:layout_constraintTop_toBottomOf="@id/template_account_amount_source_label"
144         />
145     <com.google.android.material.textfield.TextInputLayout
146         android:id="@+id/template_details_account_amount_layout"
147         android:layout_width="match_parent"
148         android:layout_height="wrap_content"
149         android:layout_marginBottom="@dimen/text_margin"
150         android:textAppearance="?attr/textAppearanceListItem"
151         app:layout_constraintBottom_toTopOf="@id/template_details_negate_amount_label"
152         app:layout_constraintEnd_toEndOf="parent"
153         app:layout_constraintStart_toStartOf="parent"
154         app:layout_constraintTop_toBottomOf="@id/template_details_account_amount_source"
155         >
156         <com.google.android.material.textfield.TextInputEditText
157             android:id="@+id/template_details_account_amount"
158             android:layout_width="match_parent"
159             android:layout_height="wrap_content"
160             android:hint="@string/template_details_account_amount_label"
161             android:inputType="number|numberDecimal|numberSigned"
162             android:selectAllOnFocus="true"
163             />
164     </com.google.android.material.textfield.TextInputLayout>
165     <TextView
166         android:id="@+id/template_details_negate_amount_label"
167         android:layout_width="0dp"
168         android:layout_height="wrap_content"
169         android:layout_marginTop="@dimen/text_margin"
170         android:text="@string/template_account_negate_amount_label"
171         android:textAppearance="?attr/textAppearanceListItem"
172         app:layout_constraintBottom_toTopOf="@id/template_details_negate_amount_text"
173         app:layout_constraintEnd_toStartOf="@+id/negate_amount_switch"
174         app:layout_constraintStart_toStartOf="parent"
175         app:layout_constraintTop_toBottomOf="@id/template_details_account_amount_layout"
176         />
177     <TextView
178         android:id="@+id/template_details_negate_amount_text"
179         android:layout_width="0dp"
180         android:layout_height="wrap_content"
181         android:text="@string/template_account_keep_amount_sign"
182         android:textAppearance="?attr/textAppearanceListItemSecondary"
183         app:layout_constraintBottom_toBottomOf="parent"
184         app:layout_constraintBottom_toTopOf="@id/template_details_negate_amount_text"
185         app:layout_constraintEnd_toStartOf="@+id/negate_amount_switch"
186         app:layout_constraintStart_toStartOf="parent"
187         app:layout_constraintTop_toBottomOf="@id/template_details_negate_amount_label"
188         />
189     <com.google.android.material.switchmaterial.SwitchMaterial
190         android:id="@+id/negate_amount_switch"
191         android:layout_width="wrap_content"
192         android:layout_height="wrap_content"
193         app:layout_constraintBottom_toBottomOf="@id/template_details_negate_amount_text"
194         app:layout_constraintEnd_toEndOf="parent"
195         app:layout_constraintTop_toTopOf="@id/template_details_negate_amount_label"
196         />
197
198 </androidx.constraintlayout.widget.ConstraintLayout>