]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/new_transaction_row.xml
add functional currency selector when entering new transactions
[mobile-ledger.git] / app / src / main / res / layout / new_transaction_row.xml
index 0b36bc4eec912c64e555e1f4a2c7f83a0844bf5b..11951e58dd60752fedd04a09ff96082e63b6c339 100644 (file)
             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="visible"
+                android:minWidth="24dp"
+                android:gravity="center_horizontal"/>
+        </androidx.constraintlayout.widget.ConstraintLayout>
 
     </androidx.constraintlayout.widget.ConstraintLayout>