1 <?xml version="1.0" encoding="utf-8"?><!--
2 ~ Copyright © 2019 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="false"
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:orientation="horizontal">
33 android:id="@+id/new_transaction_date"
34 android:layout_width="94dp"
35 android:layout_height="wrap_content"
36 android:accessibilityTraversalBefore="@+id/new_transaction_description"
37 android:drawableStart="@drawable/ic_event_gray_24dp"
39 android:enabled="true"
40 android:focusable="false"
41 android:gravity="bottom|center"
42 android:hint="@string/new_transaction_date_hint"
43 android:inputType="none"
44 android:nextFocusDown="@+id/new_transaction_acc_1"
45 android:nextFocusForward="@+id/new_transaction_description"
46 android:textAlignment="gravity"
47 android:textCursorDrawable="@android:color/transparent"
48 app:layout_constrainedHeight="true"
49 app:layout_constraintHorizontal_weight="8"
50 app:layout_constraintStart_toStartOf="parent"
51 app:layout_constraintTop_toTopOf="parent"
52 tools:ignore="TextFields" />
54 <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
55 android:id="@+id/new_transaction_description"
56 android:layout_width="0dp"
57 android:layout_height="wrap_content"
58 android:layout_gravity="bottom"
59 android:layout_marginStart="8dp"
60 android:accessibilityTraversalAfter="@+id/new_transaction_date"
62 android:foregroundGravity="bottom"
63 android:gravity="bottom"
64 android:hint="@string/new_transaction_description_hint"
65 android:imeOptions="actionNext"
66 android:inputType="text"
67 android:nextFocusLeft="@+id/new_transaction_date"
68 android:nextFocusUp="@+id/new_transaction_date"
69 android:selectAllOnFocus="false"
70 android:singleLine="true"
71 app:layout_constraintEnd_toEndOf="parent"
72 app:layout_constraintHorizontal_weight="30"
73 app:layout_constraintStart_toEndOf="@id/new_transaction_date"
74 app:layout_constraintTop_toTopOf="parent" />
76 <androidx.constraintlayout.widget.ConstraintLayout
77 android:id="@+id/transaction_comment_layout"
78 android:layout_width="0dp"
79 android:layout_height="wrap_content"
81 app:layout_constraintEnd_toEndOf="parent"
82 app:layout_constraintStart_toStartOf="parent"
83 app:layout_constraintTop_toBottomOf="@id/new_transaction_description">
86 android:id="@+id/transaction_comment_button"
87 android:layout_width="wrap_content"
88 android:layout_height="wrap_content"
89 android:background="@drawable/ic_comment_gray_24dp"
90 app:layout_constraintBottom_toBottomOf="parent"
91 app:layout_constraintStart_toStartOf="parent"
92 app:layout_constraintTop_toTopOf="parent" />
94 <net.ktnx.mobileledger.ui.EditTextWithClear
95 android:id="@+id/transaction_comment"
96 android:layout_width="0dp"
97 android:layout_height="wrap_content"
98 android:imeOptions="actionNext"
99 android:inputType="text"
100 android:visibility="invisible"
101 app:layout_constraintEnd_toEndOf="parent"
102 app:layout_constraintStart_toEndOf="@id/transaction_comment_button"
103 app:layout_constraintTop_toTopOf="parent" />
104 </androidx.constraintlayout.widget.ConstraintLayout>
106 </androidx.constraintlayout.widget.ConstraintLayout>
108 <androidx.constraintlayout.widget.ConstraintLayout
109 android:id="@+id/ntr_account"
110 android:layout_width="match_parent"
111 android:layout_height="wrap_content"
112 android:animateLayoutChanges="true">
114 <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
115 android:id="@+id/account_row_acc_name"
116 android:layout_width="0dp"
117 android:layout_height="wrap_content"
118 android:layout_weight="9"
120 android:hint="@string/new_transaction_account_hint"
121 android:imeOptions="actionNext"
122 android:inputType="text"
123 android:selectAllOnFocus="false"
124 app:layout_constraintEnd_toEndOf="parent"
125 app:layout_constraintStart_toStartOf="parent"
126 app:layout_constraintTop_toTopOf="parent" />
128 <androidx.constraintlayout.widget.ConstraintLayout
129 android:id="@+id/comment_layout"
130 android:layout_width="0dp"
131 android:layout_height="wrap_content"
133 app:layout_constraintEnd_toStartOf="@id/amount_layout"
134 app:layout_constraintStart_toStartOf="parent"
135 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
138 android:id="@+id/comment_button"
139 android:layout_width="wrap_content"
140 android:layout_height="wrap_content"
141 android:background="@drawable/ic_comment_gray_24dp"
142 app:layout_constraintBottom_toBottomOf="parent"
143 app:layout_constraintStart_toStartOf="parent"
144 app:layout_constraintTop_toTopOf="parent" />
146 <net.ktnx.mobileledger.ui.EditTextWithClear
147 android:id="@+id/comment"
148 android:layout_width="0dp"
149 android:layout_height="wrap_content"
150 android:imeOptions="actionNext"
151 android:inputType="text"
152 android:visibility="invisible"
153 app:layout_constraintEnd_toEndOf="parent"
154 app:layout_constraintStart_toEndOf="@id/comment_button"
155 app:layout_constraintTop_toTopOf="parent" />
156 </androidx.constraintlayout.widget.ConstraintLayout>
158 <androidx.constraintlayout.widget.ConstraintLayout
159 android:id="@+id/amount_layout"
160 android:layout_width="wrap_content"
161 android:layout_height="wrap_content"
162 app:layout_constraintEnd_toEndOf="parent"
163 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
166 android:id="@+id/account_row_acc_amounts"
167 android:layout_width="wrap_content"
168 android:layout_height="wrap_content"
169 android:layout_gravity="bottom|end"
170 android:layout_weight="0"
172 android:foregroundGravity="bottom"
173 android:gravity="bottom|end"
174 android:hint="@string/zero_amount"
175 android:imeOptions="actionNext"
176 android:inputType="numberSigned|numberDecimal|number"
177 android:minWidth="80sp"
178 android:selectAllOnFocus="true"
179 android:textAlignment="viewEnd"
180 app:layout_constraintBottom_toBottomOf="parent"
181 app:layout_constraintLeft_toLeftOf="parent"
182 app:layout_constraintRight_toLeftOf="@id/currency"
183 app:layout_constraintTop_toTopOf="parent"
184 app:layout_constraintWidth_min="@dimen/text_margin" />
187 android:id="@+id/currency"
188 style="@style/TextAppearance.AppCompat.Widget.Button"
189 android:layout_width="wrap_content"
190 android:layout_height="wrap_content"
191 android:layout_gravity="center_vertical"
192 android:gravity="center_horizontal"
193 android:minWidth="24dp"
194 android:text="@string/currency_symbol"
195 android:textAllCaps="false"
196 android:visibility="gone"
197 app:layout_constraintBottom_toBottomOf="parent"
198 app:layout_constraintRight_toRightOf="parent"
199 app:layout_constraintTop_toTopOf="parent" />
200 </androidx.constraintlayout.widget.ConstraintLayout>
202 </androidx.constraintlayout.widget.ConstraintLayout>
205 android:id="@+id/ntr_padding"
206 android:layout_width="match_parent"
207 android:layout_height="80dp"
208 android:minHeight="80dp">