]> git.ktnx.net Git - mobile-ledger.git/commitdiff
new transaction: extract account list in a separate layout
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 24 Nov 2019 14:39:59 +0000 (16:39 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 24 Nov 2019 14:39:59 +0000 (16:39 +0200)
app/src/main/res/layout/activity_new_transaction.xml
app/src/main/res/layout/new_transaction_accounts.xml [new file with mode: 0644]

index 9320a74808c2401ee943fe06d1225f887a20e3e1..c865fdcd9a1fa7ecc1a5770441d50b4756c85054 100644 (file)
 
         </com.google.android.material.appbar.AppBarLayout>
 
-        <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/new_transaction_accounts"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:paddingStart="@dimen/activity_horizontal_margin"
-            android:paddingEnd="@dimen/activity_horizontal_margin"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/toolbar_layout">
-
-        </androidx.recyclerview.widget.RecyclerView>
+        <include layout="@layout/new_transaction_accounts" />
 
         <ProgressBar
             android:id="@+id/save_transaction_progress"
diff --git a/app/src/main/res/layout/new_transaction_accounts.xml b/app/src/main/res/layout/new_transaction_accounts.xml
new file mode 100644 (file)
index 0000000..0a40f78
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+  ~ 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
+  ~ 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.recyclerview.widget.RecyclerView 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:id="@+id/new_transaction_accounts"
+    android:layout_width="0dp"
+    android:layout_height="0dp"
+    android:paddingStart="@dimen/activity_horizontal_margin"
+    android:paddingEnd="@dimen/activity_horizontal_margin"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toBottomOf="@id/toolbar_layout"
+    tools:showIn="@layout/activity_new_transaction">
+
+</androidx.recyclerview.widget.RecyclerView>
\ No newline at end of file