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