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.
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.
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/>.
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"
26 android:id="@+id/pattern_account_label"
27 android:layout_width="match_parent"
28 android:layout_height="match_parent"
30 android:paddingTop="@dimen/text_margin"
31 android:text="@string/template_details_account_row_label"
32 app:drawableBottomCompat="@drawable/dashed_border_8dp"
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"
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"
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"
65 <com.google.android.material.textfield.TextInputEditText
66 android:id="@+id/template_details_account_name"
67 android:layout_width="match_parent"
68 android:layout_height="wrap_content"
69 android:hint="@string/template_details_account_name_label"
70 android:inputType="text"
72 </com.google.android.material.textfield.TextInputLayout>
75 android:id="@+id/template_account_comment_source_label"
76 android:layout_width="0dp"
77 android:layout_height="match_parent"
79 android:paddingTop="@dimen/text_margin"
80 android:text="@string/account_comment_source_label"
81 android:textAppearance="?attr/textAppearanceListItem"
82 app:layout_constraintEnd_toEndOf="parent"
83 app:layout_constraintStart_toStartOf="parent"
84 app:layout_constraintTop_toBottomOf="@id/template_details_account_name_layout"
87 android:id="@+id/template_details_account_comment_source"
88 android:layout_width="0dp"
89 android:layout_height="wrap_content"
90 android:minWidth="100dp"
91 android:textAppearance="?attr/textAppearanceListItemSecondary"
92 app:layout_constraintEnd_toEndOf="parent"
93 app:layout_constraintStart_toStartOf="parent"
94 app:layout_constraintTop_toBottomOf="@id/template_account_comment_source_label"
96 <com.google.android.material.textfield.TextInputLayout
97 android:id="@+id/template_details_account_comment_layout"
98 android:layout_width="match_parent"
99 android:layout_height="wrap_content"
100 android:layout_marginHorizontal="@dimen/text_margin"
101 android:textAppearance="?attr/textAppearanceListItem"
102 app:layout_constraintEnd_toEndOf="parent"
103 app:layout_constraintStart_toStartOf="parent"
104 app:layout_constraintTop_toBottomOf="@id/template_details_account_comment_source"
106 <com.google.android.material.textfield.TextInputEditText
107 android:id="@+id/template_details_account_comment"
108 android:layout_width="match_parent"
109 android:layout_height="wrap_content"
110 android:hint="@string/template_details_account_comment_label"
111 android:inputType="text"
113 </com.google.android.material.textfield.TextInputLayout>
116 android:id="@+id/template_account_amount_source_label"
117 android:layout_width="0dp"
118 android:layout_height="match_parent"
119 android:paddingTop="@dimen/text_margin"
120 android:text="@string/account_amount_source_label"
121 android:textAppearance="?attr/textAppearanceListItem"
122 app:layout_constraintEnd_toStartOf="@id/negate_amount_switch"
123 app:layout_constraintStart_toStartOf="parent"
124 app:layout_constraintTop_toBottomOf="@id/template_details_account_comment_layout"
127 android:id="@+id/template_details_account_amount_source"
128 android:layout_width="0dp"
129 android:layout_height="wrap_content"
130 android:textAppearance="?attr/textAppearanceListItemSecondary"
131 app:layout_constraintEnd_toStartOf="@id/negate_amount_switch"
132 app:layout_constraintStart_toStartOf="parent"
133 app:layout_constraintTop_toBottomOf="@id/template_account_amount_source_label"
135 <com.google.android.material.switchmaterial.SwitchMaterial
136 android:id="@+id/negate_amount_switch"
137 android:layout_width="wrap_content"
138 android:layout_height="wrap_content"
139 app:layout_constraintBottom_toBottomOf="@id/template_details_account_amount_source"
140 app:layout_constraintEnd_toEndOf="parent"
141 app:layout_constraintTop_toTopOf="@id/template_account_amount_source_label"
143 <com.google.android.material.textfield.TextInputLayout
144 android:id="@+id/template_details_account_amount_layout"
145 android:layout_width="match_parent"
146 android:layout_height="wrap_content"
147 android:layout_marginHorizontal="@dimen/text_margin"
148 android:textAppearance="?attr/textAppearanceListItem"
149 app:layout_constraintEnd_toEndOf="parent"
150 app:layout_constraintStart_toStartOf="parent"
151 app:layout_constraintTop_toBottomOf="@id/template_details_account_amount_source"
153 <com.google.android.material.textfield.TextInputEditText
154 android:id="@+id/template_details_account_amount"
155 android:layout_width="match_parent"
156 android:layout_height="wrap_content"
157 android:hint="@string/template_details_account_amount_label"
158 android:inputType="number|numberDecimal|numberSigned"
160 </com.google.android.material.textfield.TextInputLayout>
162 </androidx.constraintlayout.widget.ConstraintLayout>