1 <?xml version="1.0" encoding="utf-8"?><!--
2 ~ Copyright © 2020 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 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
19 xmlns:app="http://schemas.android.com/apk/res-auto"
20 xmlns:tools="http://schemas.android.com/tools"
21 android:layout_width="match_parent"
22 android:layout_height="wrap_content"
23 android:animateLayoutChanges="true"
24 android:orientation="vertical">
26 <androidx.constraintlayout.widget.ConstraintLayout
27 android:id="@+id/ntr_data"
28 android:layout_width="match_parent"
29 android:layout_height="wrap_content"
30 android:animateLayoutChanges="true"
31 android:orientation="horizontal"
35 android:id="@+id/dummy_text"
36 android:layout_width="wrap_content"
37 android:layout_height="wrap_content"
38 android:visibility="gone"
39 tools:ignore="MissingConstraints"
42 android:id="@+id/new_transaction_date"
43 android:layout_width="94dp"
44 android:layout_height="wrap_content"
45 android:accessibilityTraversalBefore="@+id/new_transaction_description"
46 android:drawableStart="@drawable/ic_event_gray_24dp"
48 android:enabled="true"
49 android:focusable="false"
50 android:gravity="bottom|center"
51 android:hint="@string/new_transaction_date_hint"
52 android:inputType="none"
53 android:nextFocusDown="@+id/new_transaction_acc_1"
54 android:nextFocusForward="@+id/new_transaction_description"
55 android:textAlignment="gravity"
56 android:textCursorDrawable="@android:color/transparent"
57 app:layout_constrainedHeight="true"
58 app:layout_constraintHorizontal_weight="8"
59 app:layout_constraintStart_toStartOf="parent"
60 app:layout_constraintTop_toTopOf="parent"
61 tools:ignore="TextFields" />
63 <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
64 android:id="@+id/new_transaction_description"
65 android:layout_width="0dp"
66 android:layout_height="wrap_content"
67 android:layout_gravity="bottom"
68 android:layout_marginStart="8dp"
69 android:accessibilityTraversalAfter="@+id/new_transaction_date"
71 android:foregroundGravity="bottom"
72 android:gravity="bottom"
73 android:hint="@string/new_transaction_description_hint"
74 android:imeOptions="actionNext"
75 android:inputType="text"
76 android:nextFocusLeft="@+id/new_transaction_date"
77 android:nextFocusUp="@+id/new_transaction_date"
78 android:selectAllOnFocus="false"
79 android:singleLine="true"
80 app:layout_constraintEnd_toEndOf="parent"
81 app:layout_constraintHorizontal_weight="30"
82 app:layout_constraintStart_toEndOf="@id/new_transaction_date"
83 app:layout_constraintTop_toTopOf="parent" />
85 <androidx.constraintlayout.widget.ConstraintLayout
86 android:id="@+id/transaction_comment_layout"
87 android:layout_width="0dp"
88 android:layout_height="wrap_content"
89 app:layout_constraintEnd_toEndOf="parent"
90 app:layout_constraintStart_toStartOf="parent"
91 app:layout_constraintTop_toBottomOf="@id/new_transaction_description">
94 android:id="@+id/comment_button"
95 android:layout_width="wrap_content"
96 android:layout_height="wrap_content"
97 android:background="@drawable/ic_comment_gray_24dp"
98 app:layout_constraintBottom_toBottomOf="parent"
99 app:layout_constraintStart_toStartOf="parent"
100 app:layout_constraintTop_toTopOf="parent" />
102 <net.ktnx.mobileledger.ui.EditTextWithClear
103 android:id="@+id/transaction_comment"
104 android:layout_width="0dp"
105 android:layout_height="wrap_content"
106 android:imeOptions="actionNext"
107 android:inputType="text"
108 android:visibility="invisible"
109 app:layout_constraintEnd_toEndOf="parent"
110 app:layout_constraintStart_toEndOf="@id/comment_button"
111 app:layout_constraintTop_toTopOf="parent" />
112 </androidx.constraintlayout.widget.ConstraintLayout>
114 </androidx.constraintlayout.widget.ConstraintLayout>
116 <androidx.constraintlayout.widget.ConstraintLayout
117 android:id="@+id/ntr_account"
118 android:layout_width="match_parent"
119 android:layout_height="wrap_content"
120 android:animateLayoutChanges="true">
122 <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
123 android:id="@+id/account_row_acc_name"
124 android:layout_width="0dp"
125 android:layout_height="wrap_content"
126 android:layout_weight="9"
128 android:hint="@string/new_transaction_account_hint"
129 android:imeOptions="actionNext"
130 android:inputType="text"
131 android:selectAllOnFocus="false"
132 app:layout_constraintEnd_toEndOf="parent"
133 app:layout_constraintStart_toStartOf="parent"
134 app:layout_constraintTop_toTopOf="parent" />
136 <androidx.constraintlayout.widget.ConstraintLayout
137 android:id="@+id/comment_layout"
138 android:layout_width="0dp"
139 android:layout_height="wrap_content"
140 app:layout_constraintEnd_toStartOf="@id/amount_layout"
141 app:layout_constraintStart_toStartOf="parent"
142 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
145 android:id="@id/comment_button"
146 android:layout_width="wrap_content"
147 android:layout_height="wrap_content"
148 android:background="@drawable/ic_comment_gray_24dp"
149 app:layout_constraintBottom_toBottomOf="parent"
150 app:layout_constraintStart_toStartOf="parent"
151 app:layout_constraintTop_toTopOf="parent" />
153 <net.ktnx.mobileledger.ui.EditTextWithClear
154 android:id="@+id/comment"
155 android:layout_width="0dp"
156 android:layout_height="wrap_content"
157 android:imeOptions="actionNext"
158 android:inputType="text"
159 android:visibility="invisible"
160 app:layout_constraintEnd_toEndOf="parent"
161 app:layout_constraintStart_toEndOf="@id/comment_button"
162 app:layout_constraintTop_toTopOf="parent" />
163 </androidx.constraintlayout.widget.ConstraintLayout>
165 <androidx.constraintlayout.widget.ConstraintLayout
166 android:id="@+id/amount_layout"
167 android:layout_width="wrap_content"
168 android:layout_height="wrap_content"
169 app:layout_constraintEnd_toEndOf="parent"
170 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
173 android:id="@+id/account_row_acc_amounts"
174 android:layout_width="wrap_content"
175 android:layout_height="wrap_content"
176 android:layout_gravity="bottom|end"
177 android:layout_weight="0"
179 android:foregroundGravity="bottom"
180 android:gravity="bottom|end"
181 android:hint="@string/zero_amount"
182 android:imeOptions="actionNext"
183 android:inputType="number|numberSigned|numberDecimal"
185 android:selectAllOnFocus="true"
186 android:textAlignment="viewEnd"
187 app:layout_constraintBottom_toBottomOf="parent"
188 app:layout_constraintLeft_toLeftOf="parent"
189 app:layout_constraintRight_toLeftOf="@id/currency"
190 app:layout_constraintTop_toTopOf="parent"
191 app:layout_constraintWidth_min="@dimen/text_margin" />
194 android:id="@+id/currency"
195 style="@style/TextAppearance.AppCompat.Widget.Button"
196 android:layout_width="wrap_content"
197 android:layout_height="wrap_content"
198 android:layout_gravity="center_vertical"
199 android:gravity="center_horizontal"
200 android:minWidth="24dp"
201 android:text="@string/currency_symbol"
202 android:textAllCaps="false"
203 android:visibility="gone"
204 app:layout_constraintBottom_toBottomOf="parent"
205 app:layout_constraintRight_toRightOf="parent"
206 app:layout_constraintTop_toTopOf="parent" />
207 </androidx.constraintlayout.widget.ConstraintLayout>
209 </androidx.constraintlayout.widget.ConstraintLayout>
212 android:id="@+id/ntr_padding"
213 android:layout_width="match_parent"
214 android:layout_height="80dp"
215 android:minHeight="80dp">