]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/new_transaction_row.xml
11951e58dd60752fedd04a09ff96082e63b6c339
[mobile-ledger.git] / app / src / main / res / layout / new_transaction_row.xml
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.
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="false"
24     android:orientation="vertical">
25
26     <LinearLayout
27         android:id="@+id/ntr_data"
28         android:layout_width="match_parent"
29         android:layout_height="wrap_content">
30
31         <EditText
32             android:id="@+id/new_transaction_date"
33             android:layout_width="94dp"
34             android:layout_height="wrap_content"
35             android:accessibilityTraversalBefore="@+id/new_transaction_description"
36             android:drawableStart="@drawable/ic_event_gray_24dp"
37             android:ems="10"
38             android:enabled="true"
39             android:focusable="false"
40             android:gravity="bottom|center"
41             android:hint="@string/new_transaction_date_hint"
42             android:inputType="none"
43             android:nextFocusDown="@+id/new_transaction_acc_1"
44             android:nextFocusForward="@+id/new_transaction_description"
45             android:textAlignment="gravity"
46             android:textCursorDrawable="@android:color/transparent"
47             app:layout_constrainedHeight="true"
48             app:layout_constraintBottom_toBottomOf="parent"
49             app:layout_constraintHorizontal_weight="8"
50             app:layout_constraintStart_toStartOf="parent"
51             app:layout_constraintTop_toTopOf="parent"
52             tools:ignore="TextFields" />
53
54         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
55             android:id="@+id/new_transaction_description"
56             android:layout_width="match_parent"
57             android:layout_height="wrap_content"
58             android:layout_gravity="bottom"
59             android:layout_marginStart="8dp"
60             android:accessibilityTraversalAfter="@+id/new_transaction_date"
61             android:ems="10"
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_constraintBottom_toBottomOf="parent"
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" />
76     </LinearLayout>
77
78     <androidx.constraintlayout.widget.ConstraintLayout
79         android:id="@+id/ntr_account"
80         android:layout_width="match_parent"
81         android:layout_height="wrap_content"
82         android:animateLayoutChanges="true">
83
84         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
85             android:id="@+id/account_row_acc_name"
86             android:layout_width="0dp"
87             android:layout_height="wrap_content"
88             android:layout_weight="9"
89             android:width="0dp"
90             android:hint="@string/new_transaction_account_hint"
91             android:imeOptions="actionNext"
92             android:inputType="text"
93             android:selectAllOnFocus="false"
94             app:layout_constraintEnd_toEndOf="parent"
95             app:layout_constraintStart_toStartOf="parent"
96             app:layout_constraintTop_toTopOf="parent" />
97
98         <TextView
99             android:id="@+id/comment_button"
100             android:layout_width="wrap_content"
101             android:layout_height="wrap_content"
102             android:background="@drawable/ic_comment_gray_24dp"
103             app:layout_constraintBottom_toBottomOf="parent"
104             app:layout_constraintStart_toStartOf="@+id/ntr_account"
105             app:layout_constraintTop_toBottomOf="@+id/account_row_acc_name" />
106
107         <EditText
108             android:id="@+id/comment"
109             android:layout_width="0dp"
110             android:layout_height="wrap_content"
111             android:hint="@string/transaction_account_comment_hint"
112             android:imeOptions="actionNext"
113             android:inputType="text"
114             android:visibility="gone"
115             app:layout_constraintEnd_toEndOf="@+id/ntr_account"
116             app:layout_constraintStart_toEndOf="@id/comment_button"
117             app:layout_constraintTop_toBottomOf="@id/account_row_acc_name" />
118
119         <androidx.constraintlayout.widget.ConstraintLayout
120             android:id="@+id/amount_layout"
121             android:layout_width="wrap_content"
122             android:layout_height="wrap_content"
123             app:layout_constraintEnd_toEndOf="parent"
124             app:layout_constraintTop_toBottomOf="@id/comment">
125
126             <EditText
127                 app:layout_constraintTop_toTopOf="parent"
128                 app:layout_constraintBottom_toBottomOf="parent"
129                 app:layout_constraintLeft_toLeftOf="parent"
130                 app:layout_constraintRight_toLeftOf="@id/currency"
131                 android:id="@+id/account_row_acc_amounts"
132                 android:layout_width="wrap_content"
133                 android:layout_height="wrap_content"
134                 android:layout_gravity="bottom|end"
135                 android:layout_weight="0"
136                 android:width="0dp"
137                 android:foregroundGravity="bottom"
138                 android:gravity="bottom|end"
139                 android:hint="@string/zero_amount"
140                 android:imeOptions="actionNext"
141                 android:inputType="numberSigned|numberDecimal|number"
142                 android:minWidth="80sp"
143                 android:selectAllOnFocus="true"
144                 android:textAlignment="viewEnd"
145                 app:layout_constraintWidth_min="@dimen/text_margin"/>
146
147             <TextView
148                 app:layout_constraintTop_toTopOf="parent"
149                 app:layout_constraintBottom_toBottomOf="parent"
150                 app:layout_constraintRight_toRightOf="parent"
151                 android:id="@+id/currency"
152                 android:layout_width="wrap_content"
153                 android:layout_height="wrap_content"
154                 android:layout_gravity="center_vertical"
155                 android:text="@string/currency_symbol"
156                 style="@style/TextAppearance.AppCompat.Widget.Button"
157                 android:textAllCaps="false"
158                 android:visibility="visible"
159                 android:minWidth="24dp"
160                 android:gravity="center_horizontal"/>
161         </androidx.constraintlayout.widget.ConstraintLayout>
162
163     </androidx.constraintlayout.widget.ConstraintLayout>
164
165     <FrameLayout
166         android:id="@+id/ntr_padding"
167         android:layout_width="match_parent"
168         android:layout_height="80dp"
169         android:minHeight="80dp">
170
171     </FrameLayout>
172
173 </LinearLayout>