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" />
77 android:id="@+id/progressBar"
78 style="@style/Widget.AppCompat.ProgressBar.Horizontal"
79 android:layout_width="0dp"
80 android:layout_height="wrap_content"
81 android:indeterminate="true"
82 android:indeterminateBehavior="cycle"
83 android:orientation="horizontal"
84 android:visibility="invisible"
85 app:layout_constraintTop_toBottomOf="@id/new_transaction_date"
86 app:layout_constraintStart_toStartOf="parent"
87 app:layout_constraintEnd_toEndOf="parent
89 </androidx.constraintlayout.widget.ConstraintLayout>
91 <androidx.constraintlayout.widget.ConstraintLayout
92 android:id="@+id/ntr_account"
93 android:layout_width="match_parent"
94 android:layout_height="wrap_content"
95 android:animateLayoutChanges="true">
97 <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
98 android:id="@+id/account_row_acc_name"
99 android:layout_width="0dp"
100 android:layout_height="wrap_content"
101 android:layout_weight="9"
103 android:hint="@string/new_transaction_account_hint"
104 android:imeOptions="actionNext"
105 android:inputType="text"
106 android:selectAllOnFocus="false"
107 app:layout_constraintEnd_toEndOf="parent"
108 app:layout_constraintStart_toStartOf="parent"
109 app:layout_constraintTop_toTopOf="parent" />
111 <androidx.constraintlayout.widget.ConstraintLayout
112 android:id="@+id/comment_layout"
113 android:layout_width="0dp"
114 android:layout_height="wrap_content"
116 app:layout_constraintEnd_toStartOf="@id/amount_layout"
117 app:layout_constraintStart_toStartOf="parent"
118 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
121 android:id="@+id/comment_button"
122 android:layout_width="wrap_content"
123 android:layout_height="wrap_content"
124 android:background="@drawable/ic_comment_gray_24dp"
125 app:layout_constraintBottom_toBottomOf="parent"
126 app:layout_constraintStart_toStartOf="parent"
127 app:layout_constraintTop_toTopOf="parent" />
129 <net.ktnx.mobileledger.ui.EditTextWithClear
130 android:id="@+id/comment"
131 android:layout_width="0dp"
132 android:layout_height="wrap_content"
133 android:imeOptions="actionNext"
134 android:inputType="text"
135 android:visibility="invisible"
136 app:layout_constraintEnd_toEndOf="parent"
137 app:layout_constraintStart_toEndOf="@id/comment_button"
138 app:layout_constraintTop_toTopOf="parent" />
139 </androidx.constraintlayout.widget.ConstraintLayout>
141 <androidx.constraintlayout.widget.ConstraintLayout
142 android:id="@+id/amount_layout"
143 android:layout_width="wrap_content"
144 android:layout_height="wrap_content"
145 app:layout_constraintEnd_toEndOf="parent"
146 app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
149 android:id="@+id/account_row_acc_amounts"
150 android:layout_width="wrap_content"
151 android:layout_height="wrap_content"
152 android:layout_gravity="bottom|end"
153 android:layout_weight="0"
155 android:foregroundGravity="bottom"
156 android:gravity="bottom|end"
157 android:hint="@string/zero_amount"
158 android:imeOptions="actionNext"
159 android:inputType="numberSigned|numberDecimal|number"
160 android:minWidth="80sp"
161 android:selectAllOnFocus="true"
162 android:textAlignment="viewEnd"
163 app:layout_constraintBottom_toBottomOf="parent"
164 app:layout_constraintLeft_toLeftOf="parent"
165 app:layout_constraintRight_toLeftOf="@id/currency"
166 app:layout_constraintTop_toTopOf="parent"
167 app:layout_constraintWidth_min="@dimen/text_margin" />
170 android:id="@+id/currency"
171 style="@style/TextAppearance.AppCompat.Widget.Button"
172 android:layout_width="wrap_content"
173 android:layout_height="wrap_content"
174 android:layout_gravity="center_vertical"
175 android:gravity="center_horizontal"
176 android:minWidth="24dp"
177 android:text="@string/currency_symbol"
178 android:textAllCaps="false"
179 android:visibility="gone"
180 app:layout_constraintBottom_toBottomOf="parent"
181 app:layout_constraintRight_toRightOf="parent"
182 app:layout_constraintTop_toTopOf="parent" />
183 </androidx.constraintlayout.widget.ConstraintLayout>
185 </androidx.constraintlayout.widget.ConstraintLayout>
188 android:id="@+id/ntr_padding"
189 android:layout_width="match_parent"
190 android:layout_height="80dp"
191 android:minHeight="80dp">