]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/content_new_transaction.xml
086609d708dcf8b9445ebe20a8efddedad6b3e1f
[mobile-ledger.git] / app / src / main / res / layout / content_new_transaction.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3     xmlns:app="http://schemas.android.com/apk/res-auto"
4     xmlns:tools="http://schemas.android.com/tools"
5     android:layout_width="match_parent"
6     android:layout_height="match_parent"
7     app:layout_behavior="@string/appbar_scrolling_view_behavior"
8     tools:context=".NewTransactionActivity"
9     tools:showIn="@layout/activity_new_transaction">
10
11     <ScrollView
12         android:id="@+id/transaction_details"
13         android:layout_width="match_parent"
14         android:layout_height="0dp"
15         app:layout_constraintEnd_toEndOf="parent"
16         app:layout_constraintStart_toStartOf="parent"
17         app:layout_constraintTop_toTopOf="parent">
18
19         <LinearLayout
20             android:layout_width="match_parent"
21             android:layout_height="wrap_content"
22             android:orientation="vertical">
23
24             <android.support.constraint.ConstraintLayout
25                 android:layout_width="match_parent"
26                 android:layout_height="match_parent">
27
28                 <EditText
29                     android:id="@+id/new_transaction_date"
30                     android:layout_width="94dp"
31                     android:layout_height="wrap_content"
32                     android:ems="10"
33                     android:hint="@string/new_transaction_date_hint"
34                     android:imeOptions="actionNext"
35                     android:inputType="date"
36                     android:accessibilityTraversalBefore="@+id/new_transaction_description"
37                     android:nextFocusDown="@+id/new_transaction_acc_1"
38                     android:nextFocusForward="@+id/new_transaction_description"
39                     android:onClick="pickTransactionDate"
40                     android:textAlignment="center"
41                     app:layout_constraintHorizontal_weight="8"
42                     app:layout_constraintStart_toStartOf="parent"
43                     app:layout_constraintTop_toTopOf="parent" />
44
45                 <AutoCompleteTextView
46                     android:id="@+id/new_transaction_description"
47                     android:layout_width="0dp"
48                     android:layout_height="wrap_content"
49                     android:layout_marginStart="8dp"
50                     android:accessibilityTraversalAfter="@+id/new_transaction_date"
51                     android:accessibilityTraversalBefore="@+id/new_transaction_acc_1"
52                     android:ems="10"
53                     android:hint="@string/new_transaction_description_hint"
54                     android:imeOptions="actionNext"
55                     android:inputType="textPersonName"
56                     android:nextFocusLeft="@+id/new_transaction_date"
57                     android:nextFocusRight="@+id/new_transaction_acc_1"
58                     android:nextFocusUp="@+id/new_transaction_date"
59                     android:nextFocusDown="@+id/new_transaction_acc_1"
60                     android:nextFocusForward="@+id/new_transaction_acc_1"
61                     app:layout_constraintEnd_toEndOf="parent"
62                     app:layout_constraintHorizontal_weight="30"
63                     app:layout_constraintStart_toEndOf="@+id/new_transaction_date"
64                     app:layout_constraintTop_toTopOf="parent" />
65             </android.support.constraint.ConstraintLayout>
66
67             <TableLayout
68                 android:id="@+id/new_transaction_accounts_table"
69                 android:layout_width="match_parent"
70                 android:layout_height="match_parent">
71
72                 <TableRow
73                     android:layout_width="match_parent"
74                     android:layout_height="match_parent">
75
76                     <AutoCompleteTextView
77                         android:id="@+id/new_transaction_acc_1"
78                         android:layout_width="match_parent"
79                         android:layout_height="wrap_content"
80                         android:layout_gravity="bottom"
81                         android:layout_weight="9"
82                         android:width="0dp"
83                         android:accessibilityTraversalAfter="@+id/new_transaction_description"
84                         android:accessibilityTraversalBefore="@+id/new_transaction_amt_2"
85                         android:hint="@string/new_transaction_account_hint"
86                         android:imeOptions="actionNext"
87                         android:nextFocusLeft="@+id/new_transaction_description"
88                         android:nextFocusRight="@+id/new_transaction_amt_1"
89                         android:nextFocusUp="@+id/new_transaction_description"
90                         android:nextFocusDown="@+id/new_transaction_amt_1"
91                         android:nextFocusForward="@+id/new_transaction_amt_1" />
92
93                     <EditText
94                         android:id="@+id/new_transaction_amt_1"
95                         android:layout_width="wrap_content"
96                         android:layout_height="match_parent"
97                         android:layout_gravity="bottom"
98                         android:layout_weight="1"
99                         android:width="0dp"
100                         android:hint="@string/new_transaction_amount_hint"
101                         android:imeOptions="actionNext"
102                         android:inputType="numberDecimal|numberSigned"
103                         android:minWidth="40dp"
104                         android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
105                         android:accessibilityTraversalBefore="@+id/new_transaction_acc_2"
106                         android:nextFocusLeft="@+id/new_transaction_acc_1"
107                         android:nextFocusRight="@+id/new_transaction_acc_2"
108                         android:nextFocusUp="@+id/new_transaction_acc_1"
109                         android:nextFocusDown="@+id/new_transaction_acc_2"
110                         android:nextFocusForward="@+id/new_transaction_acc_2"
111                         android:textAlignment="viewEnd" />
112                 </TableRow>
113
114                 <TableRow
115                     android:layout_width="match_parent"
116                     android:layout_height="match_parent">
117
118                     <AutoCompleteTextView
119                         android:id="@+id/new_transaction_acc_2"
120                         android:layout_width="match_parent"
121                         android:layout_height="wrap_content"
122                         android:layout_gravity="bottom"
123                         android:layout_weight="9"
124                         android:width="0dp"
125                         android:hint="@string/new_transaction_account_hint"
126                         android:imeOptions="actionNext"
127                         android:accessibilityTraversalAfter="@+id/new_transaction_amt_1"
128                         android:accessibilityTraversalBefore="@+id/new_transaction_amt_2"
129                         android:nextFocusLeft="@+id/new_transaction_amt_1"
130                         android:nextFocusRight="@+id/new_transaction_amt_2"
131                         android:nextFocusUp="@+id/new_transaction_acc_1"
132                         android:nextFocusDown="@+id/new_transaction_amt_2"
133                         android:nextFocusForward="@+id/new_transaction_amt_2" />
134
135                     <EditText
136                         android:id="@+id/new_transaction_amt_2"
137                         android:layout_width="wrap_content"
138                         android:layout_height="wrap_content"
139                         android:layout_gravity="bottom"
140                         android:layout_weight="1"
141                         android:width="0dp"
142                         android:hint="@string/new_transaction_amount_hint"
143                         android:imeOptions="actionDone"
144                         android:inputType="numberDecimal|numberSigned"
145                         android:minWidth="40dp"
146                         android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
147                         android:nextFocusLeft="@+id/new_transaction_acc_2"
148                         android:nextFocusUp="@+id/new_transaction_amt_1"
149                         android:textAlignment="viewEnd" />
150                 </TableRow>
151
152             </TableLayout>
153
154         </LinearLayout>
155     </ScrollView>
156
157 </android.support.constraint.ConstraintLayout>