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