]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/new_transaction_row.xml
whitespace
[mobile-ledger.git] / app / src / main / res / layout / new_transaction_row.xml
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.
8   ~
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.
13   ~
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/>.
16   -->
17
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">
25
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"
32         >
33
34         <TextView
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"
40             />
41         <EditText
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"
47             android:enabled="true"
48             android:focusable="false"
49             android:gravity="bottom|center"
50             android:hint="@string/new_transaction_date_hint"
51             android:inputType="none"
52             android:nextFocusDown="@+id/new_transaction_acc_1"
53             android:nextFocusForward="@+id/new_transaction_description"
54             android:textAlignment="gravity"
55             android:textCursorDrawable="@android:color/transparent"
56             app:layout_constrainedHeight="true"
57             app:layout_constraintHorizontal_weight="8"
58             app:layout_constraintStart_toStartOf="parent"
59             app:layout_constraintTop_toTopOf="parent"
60             tools:ignore="TextFields" />
61
62         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
63             android:id="@+id/new_transaction_description"
64             android:layout_width="0dp"
65             android:layout_height="wrap_content"
66             android:layout_gravity="bottom"
67             android:layout_marginStart="8dp"
68             android:accessibilityTraversalAfter="@+id/new_transaction_date"
69             android:foregroundGravity="bottom"
70             android:gravity="bottom"
71             android:hint="@string/new_transaction_description_hint"
72             android:imeOptions="actionNext"
73             android:inputType="text"
74             android:nextFocusLeft="@+id/new_transaction_date"
75             android:nextFocusUp="@+id/new_transaction_date"
76             android:selectAllOnFocus="false"
77             android:singleLine="true"
78             app:layout_constraintEnd_toEndOf="parent"
79             app:layout_constraintHorizontal_weight="30"
80             app:layout_constraintStart_toEndOf="@id/new_transaction_date"
81             app:layout_constraintTop_toTopOf="parent" />
82
83         <androidx.constraintlayout.widget.ConstraintLayout
84             android:id="@+id/transaction_comment_layout"
85             android:layout_width="0dp"
86             android:layout_height="wrap_content"
87             app:layout_constraintEnd_toEndOf="parent"
88             app:layout_constraintStart_toStartOf="parent"
89             app:layout_constraintTop_toBottomOf="@id/new_transaction_description">
90
91             <TextView
92                 android:id="@+id/comment_button"
93                 android:layout_width="wrap_content"
94                 android:layout_height="wrap_content"
95                 android:background="@drawable/ic_comment_gray_24dp"
96                 app:layout_constraintBottom_toBottomOf="parent"
97                 app:layout_constraintStart_toStartOf="parent"
98                 app:layout_constraintTop_toTopOf="parent" />
99
100             <net.ktnx.mobileledger.ui.EditTextWithClear
101                 android:id="@+id/transaction_comment"
102                 android:layout_width="0dp"
103                 android:layout_height="wrap_content"
104                 android:imeOptions="actionNext"
105                 android:inputType="text"
106                 android:visibility="invisible"
107                 app:layout_constraintEnd_toEndOf="parent"
108                 app:layout_constraintStart_toEndOf="@id/comment_button"
109                 app:layout_constraintTop_toTopOf="parent" />
110         </androidx.constraintlayout.widget.ConstraintLayout>
111
112     </androidx.constraintlayout.widget.ConstraintLayout>
113
114     <androidx.constraintlayout.widget.ConstraintLayout
115         android:id="@+id/ntr_account"
116         android:layout_width="match_parent"
117         android:layout_height="wrap_content"
118         android:animateLayoutChanges="true">
119
120         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
121             android:id="@+id/account_row_acc_name"
122             android:layout_width="0dp"
123             android:layout_height="wrap_content"
124             android:layout_weight="9"
125             android:width="0dp"
126             android:hint="@string/new_transaction_account_hint"
127             android:imeOptions="actionNext"
128             android:inputType="text"
129             android:selectAllOnFocus="false"
130             app:layout_constraintEnd_toEndOf="parent"
131             app:layout_constraintStart_toStartOf="parent"
132             app:layout_constraintTop_toTopOf="parent" />
133
134         <androidx.constraintlayout.widget.ConstraintLayout
135             android:id="@+id/comment_layout"
136             android:layout_width="0dp"
137             android:layout_height="wrap_content"
138             app:layout_constraintEnd_toStartOf="@id/amount_layout"
139             app:layout_constraintStart_toStartOf="parent"
140             app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
141
142             <TextView
143                 android:id="@id/comment_button"
144                 android:layout_width="wrap_content"
145                 android:layout_height="wrap_content"
146                 android:background="@drawable/ic_comment_gray_24dp"
147                 app:layout_constraintBottom_toBottomOf="parent"
148                 app:layout_constraintStart_toStartOf="parent"
149                 app:layout_constraintTop_toTopOf="parent" />
150
151             <net.ktnx.mobileledger.ui.EditTextWithClear
152                 android:id="@+id/comment"
153                 android:layout_width="0dp"
154                 android:layout_height="wrap_content"
155                 android:imeOptions="actionNext"
156                 android:inputType="text"
157                 android:visibility="invisible"
158                 app:layout_constraintEnd_toEndOf="parent"
159                 app:layout_constraintStart_toEndOf="@id/comment_button"
160                 app:layout_constraintTop_toTopOf="parent" />
161         </androidx.constraintlayout.widget.ConstraintLayout>
162
163         <androidx.constraintlayout.widget.ConstraintLayout
164             android:id="@+id/amount_layout"
165             android:layout_width="wrap_content"
166             android:layout_height="wrap_content"
167             app:layout_constraintEnd_toEndOf="parent"
168             app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
169
170             <EditText
171                 android:id="@+id/account_row_acc_amounts"
172                 android:layout_width="wrap_content"
173                 android:layout_height="wrap_content"
174                 android:layout_gravity="bottom|end"
175                 android:layout_weight="0"
176                 android:width="0dp"
177                 android:foregroundGravity="bottom"
178                 android:gravity="bottom|end"
179                 android:hint="@string/zero_amount"
180                 android:imeOptions="actionNext"
181                 android:inputType="number|numberSigned|numberDecimal"
182                 android:minEms="4"
183                 android:selectAllOnFocus="true"
184                 android:textAlignment="viewEnd"
185                 app:layout_constraintBottom_toBottomOf="parent"
186                 app:layout_constraintLeft_toLeftOf="parent"
187                 app:layout_constraintRight_toLeftOf="@id/currency"
188                 app:layout_constraintTop_toTopOf="parent"
189                 app:layout_constraintWidth_min="@dimen/text_margin" />
190
191             <TextView
192                 android:id="@+id/currency"
193                 style="@style/TextAppearance.AppCompat.Widget.Button"
194                 android:layout_width="wrap_content"
195                 android:layout_height="wrap_content"
196                 android:layout_gravity="center_vertical"
197                 android:gravity="center_horizontal"
198                 android:minWidth="24dp"
199                 android:text="@string/currency_symbol"
200                 android:textAllCaps="false"
201                 android:visibility="gone"
202                 app:layout_constraintBottom_toBottomOf="parent"
203                 app:layout_constraintRight_toRightOf="parent"
204                 app:layout_constraintTop_toTopOf="parent" />
205         </androidx.constraintlayout.widget.ConstraintLayout>
206
207     </androidx.constraintlayout.widget.ConstraintLayout>
208
209     <FrameLayout
210         android:id="@+id/ntr_padding"
211         android:layout_width="match_parent"
212         android:layout_height="80dp"
213         android:minHeight="80dp">
214
215     </FrameLayout>
216
217 </LinearLayout>