]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/new_transaction_row.xml
fix focused comment text color on re-configuration; stop using Colors.defaultTextColor*
[mobile-ledger.git] / app / src / main / res / layout / new_transaction_row.xml
index 782955db4da91397706691963b5337f497667cd0..e85b3c6620a327d8964db911bb830230e83594b7 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?><!--
-  ~ Copyright © 2019 Damyan Ivanov.
+  ~ Copyright © 2020 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
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:animateLayoutChanges="false"
+    android:animateLayoutChanges="true"
     android:orientation="vertical">
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/ntr_data"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="horizontal">
+        android:animateLayoutChanges="true"
+        android:orientation="horizontal"
+        >
 
+        <TextView
+            android:id="@+id/dummy_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:visibility="gone"
+            tools:ignore="MissingConstraints"
+            />
         <EditText
             android:id="@+id/new_transaction_date"
             android:layout_width="94dp"
             app:layout_constraintStart_toEndOf="@id/new_transaction_date"
             app:layout_constraintTop_toTopOf="parent" />
 
-        <ProgressBar
-            android:id="@+id/progressBar"
-            style="@style/Widget.AppCompat.ProgressBar.Horizontal"
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/transaction_comment_layout"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:indeterminate="true"
-            android:indeterminateBehavior="cycle"
-            android:orientation="horizontal"
-            android:visibility="invisible"
-            app:layout_constraintTop_toBottomOf="@id/new_transaction_date"
+            app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintEnd_toEndOf="parent
-"/>
+            app:layout_constraintTop_toBottomOf="@id/new_transaction_description">
+
+            <TextView
+                android:id="@+id/comment_button"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@drawable/ic_comment_gray_24dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <net.ktnx.mobileledger.ui.EditTextWithClear
+                android:id="@+id/transaction_comment"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:imeOptions="actionNext"
+                android:inputType="text"
+                android:visibility="invisible"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toEndOf="@id/comment_button"
+                app:layout_constraintTop_toTopOf="parent" />
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
     </androidx.constraintlayout.widget.ConstraintLayout>
 
     <androidx.constraintlayout.widget.ConstraintLayout
             android:id="@+id/comment_layout"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:alpha="0.50"
             app:layout_constraintEnd_toStartOf="@id/amount_layout"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@id/account_row_acc_name">
 
             <TextView
-                android:id="@+id/comment_button"
+                android:id="@id/comment_button"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:background="@drawable/ic_comment_gray_24dp"
                 android:gravity="bottom|end"
                 android:hint="@string/zero_amount"
                 android:imeOptions="actionNext"
-                android:inputType="numberSigned|numberDecimal|number"
-                android:minWidth="80sp"
+                android:inputType="number|numberSigned|numberDecimal"
+                android:minEms="4"
                 android:selectAllOnFocus="true"
                 android:textAlignment="viewEnd"
                 app:layout_constraintBottom_toBottomOf="parent"