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