]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/new_transaction_header_row.xml
split new transaction item holder in two
[mobile-ledger.git] / app / src / main / res / layout / new_transaction_header_row.xml
diff --git a/app/src/main/res/layout/new_transaction_header_row.xml b/app/src/main/res/layout/new_transaction_header_row.xml
new file mode 100644 (file)
index 0000000..9f0ff19
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+  ~ Copyright © 2021 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
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ (at your opinion), any later version.
+  ~
+  ~ MoLe is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  ~ GNU General Public License terms for details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
+  -->
+
+<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"
+    android:layout_height="wrap_content"
+    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"
+        android:layout_height="wrap_content"
+        android:accessibilityTraversalBefore="@+id/new_transaction_description"
+        android:drawableStart="@drawable/ic_event_gray_24dp"
+        android:enabled="true"
+        android:focusable="false"
+        android:gravity="bottom|center"
+        android:hint="@string/new_transaction_date_hint"
+        android:inputType="none"
+        android:nextFocusDown="@+id/new_transaction_acc_1"
+        android:nextFocusForward="@+id/new_transaction_description"
+        android:textAlignment="gravity"
+        android:textCursorDrawable="@android:color/transparent"
+        app:layout_constrainedHeight="true"
+        app:layout_constraintHorizontal_weight="8"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:ignore="TextFields"
+        />
+
+    <net.ktnx.mobileledger.ui.AutoCompleteTextViewWithClear
+        android:id="@+id/new_transaction_description"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom"
+        android:layout_marginStart="8dp"
+        android:accessibilityTraversalAfter="@+id/new_transaction_date"
+        android:foregroundGravity="bottom"
+        android:gravity="bottom"
+        android:hint="@string/new_transaction_description_hint"
+        android:imeOptions="actionNext"
+        android:inputType="text"
+        android:nextFocusLeft="@+id/new_transaction_date"
+        android:nextFocusUp="@+id/new_transaction_date"
+        android:selectAllOnFocus="false"
+        android:singleLine="true"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintHorizontal_weight="30"
+        app:layout_constraintStart_toEndOf="@id/new_transaction_date"
+        app:layout_constraintTop_toTopOf="parent"
+        />
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/transaction_comment_layout"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/new_transaction_description"
+        >
+
+        <TextView
+            android:id="@+id/transaction_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/transaction_comment_button"
+            app:layout_constraintTop_toTopOf="parent"
+            />
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file