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