]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/template_details_account.xml
implement account name lookup in Templates' account fields
[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:paddingHorizontal="@dimen/text_margin"
24     >
25     <TextView
26         android:id="@+id/pattern_account_label"
27         android:layout_width="match_parent"
28         android:layout_height="match_parent"
29         android:gravity="end"
30         android:paddingTop="@dimen/text_margin"
31         android:text="@string/template_details_account_row_label"
32         app:drawableBottomCompat="@drawable/dashed_border_8dp"
33         />
34     <TextView
35         android:id="@+id/template_account_name_source_label"
36         android:layout_width="0dp"
37         android:layout_height="match_parent"
38         android:paddingTop="@dimen/text_margin"
39         android:text="@string/account_name_source_label"
40         android:textAppearance="?attr/textAppearanceListItem"
41         app:layout_constraintEnd_toEndOf="parent"
42         app:layout_constraintStart_toStartOf="parent"
43         app:layout_constraintTop_toBottomOf="@id/pattern_account_label"
44         />
45     <TextView
46         android:id="@+id/template_details_account_name_source"
47         android:layout_width="0dp"
48         android:layout_height="wrap_content"
49         android:minWidth="100dp"
50         android:textAppearance="?attr/textAppearanceListItemSecondary"
51         app:layout_constraintEnd_toEndOf="parent"
52         app:layout_constraintStart_toStartOf="parent"
53         app:layout_constraintTop_toBottomOf="@id/template_account_name_source_label"
54         />
55     <com.google.android.material.textfield.TextInputLayout
56         android:id="@+id/template_details_account_name_layout"
57         android:layout_width="match_parent"
58         android:layout_height="wrap_content"
59         android:layout_marginHorizontal="@dimen/text_margin"
60         android:textAppearance="?attr/textAppearanceListItem"
61         app:layout_constraintEnd_toEndOf="parent"
62         app:layout_constraintStart_toStartOf="parent"
63         app:layout_constraintTop_toBottomOf="@id/template_details_account_name_source"
64         app:endIconMode="clear_text"
65         >
66         <com.google.android.material.textfield.MaterialAutoCompleteTextView
67             style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
68             android:id="@+id/template_details_account_name"
69             android:layout_width="match_parent"
70             android:layout_height="wrap_content"
71             android:hint="@string/template_details_account_name_label"
72             android:inputType="text"
73             />
74     </com.google.android.material.textfield.TextInputLayout>
75
76     <TextView
77         android:id="@+id/template_account_comment_source_label"
78         android:layout_width="0dp"
79         android:layout_height="match_parent"
80
81         android:paddingTop="@dimen/text_margin"
82         android:text="@string/account_comment_source_label"
83         android:textAppearance="?attr/textAppearanceListItem"
84         app:layout_constraintEnd_toEndOf="parent"
85         app:layout_constraintStart_toStartOf="parent"
86         app:layout_constraintTop_toBottomOf="@id/template_details_account_name_layout"
87         />
88     <TextView
89         android:id="@+id/template_details_account_comment_source"
90         android:layout_width="0dp"
91         android:layout_height="wrap_content"
92         android:minWidth="100dp"
93         android:textAppearance="?attr/textAppearanceListItemSecondary"
94         app:layout_constraintEnd_toEndOf="parent"
95         app:layout_constraintStart_toStartOf="parent"
96         app:layout_constraintTop_toBottomOf="@id/template_account_comment_source_label"
97         />
98     <com.google.android.material.textfield.TextInputLayout
99         android:id="@+id/template_details_account_comment_layout"
100         android:layout_width="match_parent"
101         android:layout_height="wrap_content"
102         android:layout_marginHorizontal="@dimen/text_margin"
103         android:textAppearance="?attr/textAppearanceListItem"
104         app:layout_constraintEnd_toEndOf="parent"
105         app:layout_constraintStart_toStartOf="parent"
106         app:layout_constraintTop_toBottomOf="@id/template_details_account_comment_source"
107         >
108         <com.google.android.material.textfield.TextInputEditText
109             android:id="@+id/template_details_account_comment"
110             android:layout_width="match_parent"
111             android:layout_height="wrap_content"
112             android:hint="@string/template_details_account_comment_label"
113             android:inputType="text"
114             />
115     </com.google.android.material.textfield.TextInputLayout>
116
117     <TextView
118         android:id="@+id/template_account_amount_source_label"
119         android:layout_width="0dp"
120         android:layout_height="match_parent"
121         android:paddingTop="@dimen/text_margin"
122         android:text="@string/account_amount_source_label"
123         android:textAppearance="?attr/textAppearanceListItem"
124         app:layout_constraintEnd_toStartOf="@id/negate_amount_switch"
125         app:layout_constraintStart_toStartOf="parent"
126         app:layout_constraintTop_toBottomOf="@id/template_details_account_comment_layout"
127         />
128     <TextView
129         android:id="@+id/template_details_account_amount_source"
130         android:layout_width="0dp"
131         android:layout_height="wrap_content"
132         android:textAppearance="?attr/textAppearanceListItemSecondary"
133         app:layout_constraintEnd_toStartOf="@id/negate_amount_switch"
134         app:layout_constraintStart_toStartOf="parent"
135         app:layout_constraintTop_toBottomOf="@id/template_account_amount_source_label"
136         />
137     <com.google.android.material.switchmaterial.SwitchMaterial
138         android:id="@+id/negate_amount_switch"
139         android:layout_width="wrap_content"
140         android:layout_height="wrap_content"
141         app:layout_constraintBottom_toBottomOf="@id/template_details_account_amount_source"
142         app:layout_constraintEnd_toEndOf="parent"
143         app:layout_constraintTop_toTopOf="@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_marginHorizontal="@dimen/text_margin"
150         android:textAppearance="?attr/textAppearanceListItem"
151         app:layout_constraintEnd_toEndOf="parent"
152         app:layout_constraintStart_toStartOf="parent"
153         app:layout_constraintTop_toBottomOf="@id/template_details_account_amount_source"
154         >
155         <com.google.android.material.textfield.TextInputEditText
156             android:id="@+id/template_details_account_amount"
157             android:layout_width="match_parent"
158             android:layout_height="wrap_content"
159             android:hint="@string/template_details_account_amount_label"
160             android:inputType="number|numberDecimal|numberSigned"
161             />
162     </com.google.android.material.textfield.TextInputLayout>
163
164 </androidx.constraintlayout.widget.ConstraintLayout>