]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/new_transaction_row.xml
new transaction: hide currency/commodity selector by default; add menu item for showing
[mobile-ledger.git] / app / src / main / res / layout / new_transaction_row.xml
index 508eea9892b1529a7ae7e58d6625689d1bd2e66a..65814a79a3779d0008c7ed72a9fee04a041c23b7 100644 (file)
@@ -78,7 +78,8 @@
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/ntr_account"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:animateLayoutChanges="true">
 
         <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
             android:id="@+id/account_row_acc_name"
@@ -98,9 +99,8 @@
             android:id="@+id/comment_button"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:alpha="0.5"
-            android:drawableStart="@drawable/ic_comment_black_24dp"
-            app:layout_constraintBottom_toBottomOf="@+id/comment"
+            android:background="@drawable/ic_comment_gray_24dp"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintStart_toStartOf="@+id/ntr_account"
             app:layout_constraintTop_toBottomOf="@+id/account_row_acc_name" />
 
             android:hint="@string/transaction_account_comment_hint"
             android:imeOptions="actionNext"
             android:inputType="text"
+            android:visibility="gone"
             app:layout_constraintEnd_toEndOf="@+id/ntr_account"
             app:layout_constraintStart_toEndOf="@id/comment_button"
             app:layout_constraintTop_toBottomOf="@id/account_row_acc_name" />
 
-        <LinearLayout
+        <androidx.constraintlayout.widget.ConstraintLayout
             android:id="@+id/amount_layout"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             app:layout_constraintTop_toBottomOf="@id/comment">
 
             <EditText
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toLeftOf="@id/currency"
                 android:id="@+id/account_row_acc_amounts"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:inputType="numberSigned|numberDecimal|number"
                 android:minWidth="80sp"
                 android:selectAllOnFocus="true"
-                android:textAlignment="viewEnd" />
-        </LinearLayout>
+                android:textAlignment="viewEnd"
+                app:layout_constraintWidth_min="@dimen/text_margin"/>
+
+            <TextView
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                android:id="@+id/currency"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="@string/currency_symbol"
+                style="@style/TextAppearance.AppCompat.Widget.Button"
+                android:textAllCaps="false"
+                android:visibility="gone"
+                android:minWidth="24dp"
+                android:gravity="center_horizontal"/>
+        </androidx.constraintlayout.widget.ConstraintLayout>
 
     </androidx.constraintlayout.widget.ConstraintLayout>