]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/content_new_transaction.xml
fixed min amount width of 40dp (abt. 6 digits)
[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
36                 <TableRow
37                     android:layout_width="match_parent"
38                     android:layout_height="match_parent">
39
40                     <AutoCompleteTextView
41                         android:id="@+id/new_transaction_acc_1"
42                         android:layout_width="match_parent"
43                         android:layout_height="wrap_content"
44                         android:layout_weight="9"
45                         android:width="0dp"
46                         android:hint="@string/new_transaction_account_hint"
47                         android:nextFocusDown="@id/new_transaction_amt_1"
48                         android:nextFocusForward="@id/new_transaction_amt_1" />
49
50                     <EditText
51                         android:id="@+id/new_transaction_amt_1"
52                         android:layout_width="wrap_content"
53                         android:layout_height="wrap_content"
54                         android:layout_weight="1"
55                         android:width="0dp"
56                         android:hint="@string/new_transaction_amount_hint"
57                         android:inputType="numberDecimal|numberSigned"
58                         android:minWidth="40dp"
59                         android:nextFocusDown="@id/new_transaction_acc_2"
60                         android:nextFocusForward="@id/new_transaction_acc_2"
61                         android:textAlignment="viewEnd" />
62                 </TableRow>
63
64                 <TableRow
65                     android:layout_width="match_parent"
66                     android:layout_height="match_parent">
67
68                     <AutoCompleteTextView
69                         android:id="@+id/new_transaction_acc_2"
70                         android:layout_width="match_parent"
71                         android:layout_height="wrap_content"
72                         android:layout_weight="9"
73                         android:width="0dp"
74                         android:hint="@string/new_transaction_account_hint"
75                         android:nextFocusDown="@id/new_transaction_amt_2"
76                         android:nextFocusForward="@id/new_transaction_amt_2" />
77
78                     <EditText
79                         android:id="@+id/new_transaction_amt_2"
80                         android:layout_width="wrap_content"
81                         android:layout_height="wrap_content"
82                         android:layout_weight="1"
83                         android:width="0dp"
84                         android:hint="@string/new_transaction_amount_hint"
85                         android:inputType="numberDecimal|numberSigned"
86                         android:minWidth="40dp"
87                         android:textAlignment="viewEnd" />
88                 </TableRow>
89
90             </TableLayout>
91
92         </LinearLayout>
93     </ScrollView>
94
95 </android.support.constraint.ConstraintLayout>