]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/content_new_transaction.xml
b4b6babedf9bc1a90e3310dba53742171682d1a0
[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:inputType="date"
35                     android:onClick="pickTransactionDate"
36                     android:textAlignment="center"
37                     app:layout_constraintHorizontal_weight="8"
38                     app:layout_constraintStart_toStartOf="parent"
39                     app:layout_constraintTop_toTopOf="parent" />
40
41                 <EditText
42                     android:id="@+id/new_transaction_description"
43                     android:layout_width="0dp"
44                     android:layout_height="wrap_content"
45                     android:layout_marginStart="8dp"
46                     android:autofillHints=""
47                     android:ems="10"
48                     android:hint="@string/new_transaction_description_hint"
49                     android:inputType="textPersonName"
50                     app:layout_constraintEnd_toEndOf="parent"
51                     app:layout_constraintHorizontal_weight="30"
52                     app:layout_constraintStart_toEndOf="@+id/new_transaction_date"
53                     app:layout_constraintTop_toTopOf="parent" />
54             </android.support.constraint.ConstraintLayout>
55
56             <TableLayout
57                 android:id="@+id/new_transaction_accounts_table"
58                 android:layout_width="match_parent"
59                 android:layout_height="match_parent">
60
61                 <TableRow
62                     android:layout_width="match_parent"
63                     android:layout_height="match_parent">
64
65                     <AutoCompleteTextView
66                         android:id="@+id/new_transaction_acc_1"
67                         android:layout_width="match_parent"
68                         android:layout_height="wrap_content"
69                         android:layout_weight="9"
70                         android:width="0dp"
71                         android:hint="@string/new_transaction_account_hint"
72                         android:nextFocusDown="@id/new_transaction_amt_1"
73                         android:nextFocusForward="@id/new_transaction_amt_1" />
74
75                     <EditText
76                         android:id="@+id/new_transaction_amt_1"
77                         android:layout_width="wrap_content"
78                         android:layout_height="wrap_content"
79                         android:layout_weight="1"
80                         android:width="0dp"
81                         android:hint="@string/new_transaction_amount_hint"
82                         android:inputType="numberDecimal|numberSigned"
83                         android:minWidth="40dp"
84                         android:nextFocusDown="@id/new_transaction_acc_2"
85                         android:nextFocusForward="@id/new_transaction_acc_2"
86                         android:textAlignment="viewEnd" />
87                 </TableRow>
88
89                 <TableRow
90                     android:layout_width="match_parent"
91                     android:layout_height="match_parent">
92
93                     <AutoCompleteTextView
94                         android:id="@+id/new_transaction_acc_2"
95                         android:layout_width="match_parent"
96                         android:layout_height="wrap_content"
97                         android:layout_weight="9"
98                         android:width="0dp"
99                         android:hint="@string/new_transaction_account_hint"
100                         android:nextFocusDown="@id/new_transaction_amt_2"
101                         android:nextFocusForward="@id/new_transaction_amt_2" />
102
103                     <EditText
104                         android:id="@+id/new_transaction_amt_2"
105                         android:layout_width="wrap_content"
106                         android:layout_height="wrap_content"
107                         android:layout_weight="1"
108                         android:width="0dp"
109                         android:hint="@string/new_transaction_amount_hint"
110                         android:inputType="numberDecimal|numberSigned"
111                         android:minWidth="40dp"
112                         android:textAlignment="viewEnd" />
113                 </TableRow>
114
115             </TableLayout>
116
117         </LinearLayout>
118     </ScrollView>
119
120 </android.support.constraint.ConstraintLayout>