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="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">
34 android:id="@+id/new_transaction_date"
35 android:layout_width="94dp"
36 android:layout_height="wrap_content"
37 android:accessibilityTraversalBefore="@+id/new_transaction_description"
38 android:drawableStart="@drawable/ic_event_gray_24dp"
40 android:enabled="true"
41 android:focusable="false"
42 android:gravity="bottom|center"
43 android:hint="@string/new_transaction_date_hint"
44 android:inputType="none"
45 android:nextFocusDown="@+id/new_transaction_acc_1"
46 android:nextFocusForward="@+id/new_transaction_description"
47 android:textAlignment="gravity"
48 android:textCursorDrawable="@android:color/transparent"
49 app:layout_constrainedHeight="true"
50 app:layout_constraintHorizontal_weight="8"
51 app:layout_constraintStart_toStartOf="parent"
52 app:layout_constraintTop_toTopOf="parent"
53 tools:ignore="TextFields" />
55 <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
56 android:id="@+id/new_transaction_description"
57 android:layout_width="0dp"
58 android:layout_height="wrap_content"
59 android:layout_gravity="bottom"
60 android:layout_marginStart="8dp"
61 android:accessibilityTraversalAfter="@+id/new_transaction_date"
63 android:foregroundGravity="bottom"
64 android:gravity="bottom"
65 android:hint="@string/new_transaction_description_hint"
66 android:imeOptions="actionNext"
67 android:inputType="text"
68 android:nextFocusLeft="@+id/new_transaction_date"
69 android:nextFocusUp="@+id/new_transaction_date"
70 android:selectAllOnFocus="false"
71 android:singleLine="true"
72 app:layout_constraintEnd_toEndOf="parent"
73 app:layout_constraintHorizontal_weight="30"
74 app:layout_constraintStart_toEndOf="@id/new_transaction_date"
75 app:layout_constraintTop_toTopOf="parent" />
77 <androidx.constraintlayout.widget.ConstraintLayout
78 android:id="@+id/transaction_comment_layout"
79 android:layout_width="0dp"
80 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/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/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"
132 app:layout_constraintEnd_toStartOf="@id/amount_layout"
133 app:layout_constraintStart_toStartOf="parent"
134 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
137 android:id="@id/comment_button"
138 android:layout_width="wrap_content"
139 android:layout_height="wrap_content"
140 android:background="@drawable/ic_comment_gray_24dp"
141 app:layout_constraintBottom_toBottomOf="parent"
142 app:layout_constraintStart_toStartOf="parent"
143 app:layout_constraintTop_toTopOf="parent" />
145 <net.ktnx.mobileledger.ui.EditTextWithClear
146 android:id="@+id/comment"
147 android:layout_width="0dp"
148 android:layout_height="wrap_content"
149 android:imeOptions="actionNext"
150 android:inputType="text"
151 android:visibility="invisible"
152 app:layout_constraintEnd_toEndOf="parent"
153 app:layout_constraintStart_toEndOf="@id/comment_button"
154 app:layout_constraintTop_toTopOf="parent" />
155 </androidx.constraintlayout.widget.ConstraintLayout>
157 <androidx.constraintlayout.widget.ConstraintLayout
158 android:id="@+id/amount_layout"
159 android:layout_width="wrap_content"
160 android:layout_height="wrap_content"
161 app:layout_constraintEnd_toEndOf="parent"
162 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
165 android:id="@+id/account_row_acc_amounts"
166 android:layout_width="wrap_content"
167 android:layout_height="wrap_content"
168 android:layout_gravity="bottom|end"
169 android:layout_weight="0"
171 android:foregroundGravity="bottom"
172 android:gravity="bottom|end"
173 android:hint="@string/zero_amount"
174 android:imeOptions="actionNext"
175 android:inputType="numberSigned|numberDecimal|number"
176 android:minWidth="80sp"
177 android:selectAllOnFocus="true"
178 android:textAlignment="viewEnd"
179 app:layout_constraintBottom_toBottomOf="parent"
180 app:layout_constraintLeft_toLeftOf="parent"
181 app:layout_constraintRight_toLeftOf="@id/currency"
182 app:layout_constraintTop_toTopOf="parent"
183 app:layout_constraintWidth_min="@dimen/text_margin" />
186 android:id="@+id/currency"
187 style="@style/TextAppearance.AppCompat.Widget.Button"
188 android:layout_width="wrap_content"
189 android:layout_height="wrap_content"
190 android:layout_gravity="center_vertical"
191 android:gravity="center_horizontal"
192 android:minWidth="24dp"
193 android:text="@string/currency_symbol"
194 android:textAllCaps="false"
195 android:visibility="gone"
196 app:layout_constraintBottom_toBottomOf="parent"
197 app:layout_constraintRight_toRightOf="parent"
198 app:layout_constraintTop_toTopOf="parent" />
199 </androidx.constraintlayout.widget.ConstraintLayout>
201 </androidx.constraintlayout.widget.ConstraintLayout>
204 android:id="@+id/ntr_padding"
205 android:layout_width="match_parent"
206 android:layout_height="80dp"
207 android:minHeight="80dp">