]> git.ktnx.net Git - mobile-ledger.git/commitdiff
use a table for account rows
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 30 Nov 2018 18:25:16 +0000 (18:25 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 30 Nov 2018 18:25:16 +0000 (18:25 +0000)
app/src/main/res/layout/content_new_transaction.xml

index f5cd330e72b28b1ba62f9568cebf09272e536c42..f6aa059f30b0e4c4a65d7861fcce4e3ebd7b6df3 100644 (file)
                 android:onClick="pickTransactionDate"
                 android:textAlignment="center" />
 
-            <LinearLayout
-                android:id="@+id/new_transaction_accounts"
+            <TableLayout
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical">
+                android:layout_height="match_parent">
 
-                <AutoCompleteTextView
+                <TableRow
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:hint="@string/new_transaction_account_label"
-                    android:text="" />
+                    android:layout_height="match_parent">
 
-                <EditText
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:ems="10"
-                    android:hint="@string/new_transaction_amount_hint"
-                    android:inputType="numberSigned|numberDecimal"
-                    android:textAlignment="viewEnd" />
-            </LinearLayout>
+                    <AutoCompleteTextView
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="9"
+                        android:width="0dp"
+                        android:hint="@string/new_transaction_account_label" />
 
-            <LinearLayout
-                android:id="@+id/new_transaction_accounts"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical">
+                    <EditText
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="end"
+                        android:layout_weight="1"
+                        android:width="0dp"
+                        android:minWidth="36pt"
+                        android:ems="10"
+                        android:gravity="end"
+                        android:hint="@string/new_transaction_amount_hint"
+                        android:inputType="numberDecimal|numberSigned"
+                        android:textAlignment="viewEnd" />
+                </TableRow>
 
-                <AutoCompleteTextView
+                <TableRow
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:hint="@string/new_transaction_account_label"
-                    android:text="" />
+                    android:layout_height="match_parent">
 
-                <EditText
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:ems="10"
-                    android:hint="@string/new_transaction_amount_hint"
-                    android:inputType="numberSigned|numberDecimal"
-                    android:textAlignment="viewEnd" />
-            </LinearLayout>
+                    <AutoCompleteTextView
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="9"
+                        android:width="0dp"
+                        android:hint="@string/new_transaction_account_label" />
+
+                    <EditText
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="end"
+                        android:layout_weight="1"
+                        android:width="0dp"
+                        android:minWidth="36pt"
+                        android:ems="10"
+                        android:gravity="end"
+                        android:hint="@string/new_transaction_amount_hint"
+                        android:inputType="numberDecimal|numberSigned"
+                        android:textAlignment="viewEnd" />
+                </TableRow>
+
+            </TableLayout>
 
         </LinearLayout>
     </ScrollView>