]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/content_new_transaction.xml
close the drawer when the settings item is selected
[mobile-ledger.git] / app / src / main / res / layout / content_new_transaction.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3   ~ Copyright © 2018 Damyan Ivanov.
4   ~ This file is part of Mobile-Ledger.
5   ~ Mobile-Ledger is free software: you can distribute it and/or modify it
6   ~ under the term of the GNU General Public License as published by
7   ~ the Free Software Foundation, either version 3 of the License, or
8   ~ (at your opinion), any later version.
9   ~
10   ~ Mobile-Ledger is distributed in the hope that it will be useful,
11   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
12   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13   ~ GNU General Public License terms for details.
14   ~
15   ~ You should have received a copy of the GNU General Public License
16   ~ along with Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
17   -->
18
19 <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
20     xmlns:app="http://schemas.android.com/apk/res-auto"
21     xmlns:tools="http://schemas.android.com/tools"
22     android:layout_width="match_parent"
23     android:layout_height="match_parent"
24     app:layout_behavior="@string/appbar_scrolling_view_behavior"
25     tools:context=".ui.activity.NewTransactionActivity"
26     tools:showIn="@layout/activity_new_transaction">
27
28     <ScrollView
29         android:id="@+id/transaction_details"
30         android:layout_width="match_parent"
31         android:layout_height="0dp"
32         app:layout_constraintEnd_toEndOf="parent"
33         app:layout_constraintStart_toStartOf="parent"
34         app:layout_constraintTop_toTopOf="parent">
35
36         <LinearLayout
37             android:layout_width="match_parent"
38             android:layout_height="wrap_content"
39             android:orientation="vertical">
40
41             <android.support.constraint.ConstraintLayout
42                 android:layout_width="match_parent"
43                 android:layout_height="match_parent">
44
45                 <EditText
46                     android:id="@+id/new_transaction_date"
47                     android:layout_width="94dp"
48                     android:layout_height="0dp"
49                     android:accessibilityTraversalBefore="@+id/new_transaction_description"
50                     android:ems="10"
51                     android:foregroundGravity="bottom"
52                     android:gravity="bottom"
53                     android:hint="@string/new_transaction_date_hint"
54                     android:imeOptions="actionNext"
55                     android:inputType="date"
56                     android:nextFocusDown="@+id/new_transaction_acc_1"
57                     android:nextFocusForward="@+id/new_transaction_description"
58                     android:onClick="pickTransactionDate"
59                     android:textAlignment="center"
60                     app:layout_constrainedHeight="true"
61                     app:layout_constraintBottom_toBottomOf="parent"
62                     app:layout_constraintHorizontal_weight="8"
63                     app:layout_constraintStart_toStartOf="parent"
64                     app:layout_constraintTop_toTopOf="parent" />
65
66                 <AutoCompleteTextView
67                     android:id="@+id/new_transaction_description"
68                     android:layout_width="0dp"
69                     android:layout_height="wrap_content"
70                     android:layout_marginStart="8dp"
71                     android:accessibilityTraversalAfter="@+id/new_transaction_date"
72                     android:accessibilityTraversalBefore="@+id/new_transaction_acc_1"
73                     android:ems="10"
74                     android:hint="@string/new_transaction_description_hint"
75                     android:imeOptions="actionNext"
76                     android:nextFocusLeft="@+id/new_transaction_date"
77                     android:nextFocusRight="@+id/new_transaction_acc_1"
78                     android:nextFocusUp="@+id/new_transaction_date"
79                     android:nextFocusDown="@+id/new_transaction_acc_1"
80                     android:nextFocusForward="@+id/new_transaction_acc_1"
81                     android:singleLine="true"
82                     app:layout_constraintEnd_toEndOf="parent"
83                     app:layout_constraintHorizontal_weight="30"
84                     app:layout_constraintStart_toEndOf="@+id/new_transaction_date"
85                     app:layout_constraintTop_toTopOf="parent" />
86             </android.support.constraint.ConstraintLayout>
87
88             <TableLayout
89                 android:id="@+id/new_transaction_accounts_table"
90                 android:layout_width="match_parent"
91                 android:layout_height="match_parent">
92
93                 <TableRow
94                     android:layout_width="match_parent"
95                     android:layout_height="match_parent">
96
97                     <AutoCompleteTextView
98                         android:id="@+id/new_transaction_acc_1"
99                         android:layout_width="match_parent"
100                         android:layout_height="wrap_content"
101                         android:layout_gravity="bottom"
102                         android:layout_weight="9"
103                         android:width="0dp"
104                         android:accessibilityTraversalAfter="@+id/new_transaction_description"
105                         android:accessibilityTraversalBefore="@+id/new_transaction_amt_1"
106                         android:hint="@string/new_transaction_account_hint"
107                         android:imeOptions="actionNext"
108                         android:nextFocusLeft="@+id/new_transaction_description"
109                         android:nextFocusRight="@+id/new_transaction_amt_1"
110                         android:nextFocusUp="@+id/new_transaction_description"
111                         android:nextFocusDown="@+id/new_transaction_amt_1"
112                         android:nextFocusForward="@+id/new_transaction_amt_1"
113                         android:singleLine="true" />
114
115                     <EditText
116                         android:id="@+id/new_transaction_amt_1"
117                         android:layout_width="wrap_content"
118                         android:layout_height="match_parent"
119                         android:layout_gravity="bottom"
120                         android:layout_weight="1"
121                         android:width="0dp"
122                         android:hint="@string/new_transaction_amount_hint"
123                         android:imeOptions="actionNext"
124                         android:inputType="numberDecimal|numberSigned"
125                         android:minWidth="40dp"
126                         android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
127                         android:accessibilityTraversalBefore="@+id/new_transaction_acc_2"
128                         android:nextFocusLeft="@+id/new_transaction_acc_1"
129                         android:nextFocusRight="@+id/new_transaction_acc_2"
130                         android:nextFocusUp="@+id/new_transaction_acc_1"
131                         android:nextFocusDown="@+id/new_transaction_acc_2"
132                         android:nextFocusForward="@+id/new_transaction_acc_2"
133                         android:textAlignment="viewEnd" />
134                 </TableRow>
135
136                 <TableRow
137                     android:layout_width="match_parent"
138                     android:layout_height="match_parent">
139
140                     <AutoCompleteTextView
141                         android:id="@+id/new_transaction_acc_2"
142                         android:layout_width="match_parent"
143                         android:layout_height="wrap_content"
144                         android:layout_gravity="bottom"
145                         android:layout_weight="9"
146                         android:width="0dp"
147                         android:accessibilityTraversalAfter="@+id/new_transaction_amt_1"
148                         android:accessibilityTraversalBefore="@+id/new_transaction_amt_2"
149                         android:hint="@string/new_transaction_account_hint"
150                         android:imeOptions="actionNext"
151                         android:nextFocusLeft="@+id/new_transaction_amt_1"
152                         android:nextFocusRight="@+id/new_transaction_amt_2"
153                         android:nextFocusUp="@+id/new_transaction_acc_1"
154                         android:nextFocusDown="@+id/new_transaction_amt_2"
155                         android:nextFocusForward="@+id/new_transaction_amt_2"
156                         android:singleLine="true" />
157
158                     <EditText
159                         android:id="@+id/new_transaction_amt_2"
160                         android:layout_width="wrap_content"
161                         android:layout_height="match_parent"
162                         android:layout_gravity="bottom"
163                         android:layout_weight="1"
164                         android:width="0dp"
165                         android:hint="@string/new_transaction_amount_hint"
166                         android:imeOptions="actionDone"
167                         android:inputType="numberDecimal|numberSigned"
168                         android:minWidth="40dp"
169                         android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
170                         android:nextFocusLeft="@+id/new_transaction_acc_2"
171                         android:nextFocusUp="@+id/new_transaction_amt_1"
172                         android:textAlignment="viewEnd" />
173                 </TableRow>
174
175             </TableLayout>
176
177         </LinearLayout>
178     </ScrollView>
179
180 </android.support.constraint.ConstraintLayout>