]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/content_new_transaction.xml
dynamicaly add new table rows to the new transaction accounts list
[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:layout_width="match_parent"
13         android:layout_height="match_parent">
14
15         <LinearLayout
16             android:layout_width="match_parent"
17             android:layout_height="wrap_content"
18             android:orientation="vertical">
19
20             <EditText
21                 android:id="@+id/new_transaction_date"
22                 android:layout_width="match_parent"
23                 android:layout_height="wrap_content"
24                 android:ems="10"
25                 android:hint="@string/new_transaction_date_hint"
26                 android:inputType="date"
27                 android:onClick="pickTransactionDate"
28                 android:textAlignment="center" />
29
30             <TableLayout
31                 android:id="@+id/new_transaction_accounts_table"
32                 android:layout_width="match_parent"
33                 android:layout_height="match_parent">
34
35                 <TableRow
36                     android:layout_width="match_parent"
37                     android:layout_height="match_parent">
38
39                     <AutoCompleteTextView
40                         android:layout_width="match_parent"
41                         android:layout_height="wrap_content"
42                         android:layout_weight="9"
43                         android:width="0dp"
44                         android:hint="@string/new_transaction_account_hint" />
45
46                     <EditText
47                         android:layout_width="wrap_content"
48                         android:layout_height="wrap_content"
49                         android:layout_weight="1"
50                         android:width="0dp"
51                         android:hint="@string/new_transaction_amount_hint"
52                         android:inputType="numberDecimal|numberSigned"
53                         android:minWidth="24pt"
54                         android:textAlignment="viewEnd" />
55                 </TableRow>
56
57                 <TableRow
58                     android:layout_width="match_parent"
59                     android:layout_height="match_parent">
60
61                     <AutoCompleteTextView
62                         android:layout_width="match_parent"
63                         android:layout_height="wrap_content"
64                         android:layout_weight="9"
65                         android:width="0dp"
66                         android:hint="@string/new_transaction_account_hint" />
67
68                     <EditText
69                         android:layout_width="wrap_content"
70                         android:layout_height="wrap_content"
71                         android:layout_weight="1"
72                         android:width="0dp"
73                         android:hint="@string/new_transaction_amount_hint"
74                         android:inputType="numberDecimal|numberSigned"
75                         android:minWidth="24pt"
76                         android:textAlignment="viewEnd" />
77                 </TableRow>
78
79             </TableLayout>
80
81         </LinearLayout>
82     </ScrollView>
83
84 </android.support.constraint.ConstraintLayout>