]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/content_new_transaction.xml
new transaction: dynamically add all of the account rows, even initial ones
[mobile-ledger.git] / app / src / main / res / layout / content_new_transaction.xml
index 2ca1a156b9db5e206860ba2d8d7265c72c1be950..e8b356b91b00678874f381d6673b9bdafa8dd007 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ~ Copyright © 2018 Damyan Ivanov.
+  ~ Copyright © 2019 Damyan Ivanov.
   ~ This file is part of MoLe.
   ~ MoLe is free software: you can distribute it and/or modify it
   ~ under the term of the GNU General Public License as published by
@@ -16,7 +16,7 @@
   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
   -->
 
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
@@ -38,7 +38,7 @@
             android:layout_height="wrap_content"
             android:orientation="vertical">
 
-            <android.support.constraint.ConstraintLayout
+            <androidx.constraintlayout.widget.ConstraintLayout
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 
                     app:layout_constraintHorizontal_weight="30"
                     app:layout_constraintStart_toEndOf="@+id/new_transaction_date"
                     app:layout_constraintTop_toTopOf="parent" />
-            </android.support.constraint.ConstraintLayout>
+            </androidx.constraintlayout.widget.ConstraintLayout>
 
             <TableLayout
                 android:id="@+id/new_transaction_accounts_table"
+                android:animateLayoutChanges="true"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent">
-
-                <TableRow
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent">
-
-                    <AutoCompleteTextView
-                        android:id="@+id/new_transaction_acc_1"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="bottom"
-                        android:layout_weight="9"
-                        android:width="0dp"
-                        android:accessibilityTraversalAfter="@+id/new_transaction_description"
-                        android:accessibilityTraversalBefore="@+id/new_transaction_amt_1"
-                        android:hint="@string/new_transaction_account_hint"
-                        android:imeOptions="actionNext"
-                        android:nextFocusLeft="@+id/new_transaction_description"
-                        android:nextFocusRight="@+id/new_transaction_amt_1"
-                        android:nextFocusUp="@+id/new_transaction_description"
-                        android:nextFocusDown="@+id/new_transaction_amt_1"
-                        android:nextFocusForward="@+id/new_transaction_amt_1"
-                        android:singleLine="true" />
-
-                    <EditText
-                        android:id="@+id/new_transaction_amt_1"
-                        android:layout_width="wrap_content"
-                        android:layout_height="match_parent"
-                        android:layout_gravity="bottom"
-                        android:layout_weight="1"
-                        android:width="0dp"
-                        android:hint="@string/new_transaction_amount_hint"
-                        android:imeOptions="actionNext"
-                        android:inputType="numberDecimal|numberSigned"
-                        android:minWidth="40dp"
-                        android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
-                        android:accessibilityTraversalBefore="@+id/new_transaction_acc_2"
-                        android:nextFocusLeft="@+id/new_transaction_acc_1"
-                        android:nextFocusRight="@+id/new_transaction_acc_2"
-                        android:nextFocusUp="@+id/new_transaction_acc_1"
-                        android:nextFocusDown="@+id/new_transaction_acc_2"
-                        android:nextFocusForward="@+id/new_transaction_acc_2"
-                        android:textAlignment="viewEnd" />
-                </TableRow>
+                android:layout_height="match_parent"/>
 
-                <TableRow
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent">
-
-                    <AutoCompleteTextView
-                        android:id="@+id/new_transaction_acc_2"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="bottom"
-                        android:layout_weight="9"
-                        android:width="0dp"
-                        android:accessibilityTraversalAfter="@+id/new_transaction_amt_1"
-                        android:accessibilityTraversalBefore="@+id/new_transaction_amt_2"
-                        android:hint="@string/new_transaction_account_hint"
-                        android:imeOptions="actionNext"
-                        android:nextFocusLeft="@+id/new_transaction_amt_1"
-                        android:nextFocusRight="@+id/new_transaction_amt_2"
-                        android:nextFocusUp="@+id/new_transaction_acc_1"
-                        android:nextFocusDown="@+id/new_transaction_amt_2"
-                        android:nextFocusForward="@+id/new_transaction_amt_2"
-                        android:singleLine="true" />
-
-                    <EditText
-                        android:id="@+id/new_transaction_amt_2"
-                        android:layout_width="wrap_content"
-                        android:layout_height="match_parent"
-                        android:layout_gravity="bottom"
-                        android:layout_weight="1"
-                        android:width="0dp"
-                        android:hint="@string/new_transaction_amount_hint"
-                        android:imeOptions="actionDone"
-                        android:inputType="numberDecimal|numberSigned"
-                        android:minWidth="40dp"
-                        android:accessibilityTraversalAfter="@+id/new_transaction_acc_1"
-                        android:nextFocusLeft="@+id/new_transaction_acc_2"
-                        android:nextFocusUp="@+id/new_transaction_amt_1"
-                        android:textAlignment="viewEnd" />
-                </TableRow>
+            <FrameLayout
+                android:layout_width="match_parent"
+                android:layout_height="80dp"
+                android:background="@android:color/transparent">
 
-            </TableLayout>
+            </FrameLayout>
 
         </LinearLayout>
     </ScrollView>
 
-</android.support.constraint.ConstraintLayout>
\ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file