]> git.ktnx.net Git - mobile-ledger.git/commitdiff
border under transaction header, other improvements. much better now
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 21 Dec 2018 19:29:53 +0000 (19:29 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 21 Dec 2018 19:29:53 +0000 (19:29 +0000)
app/src/main/res/drawable/dashed_border_1dp.xml [new file with mode: 0644]
app/src/main/res/layout/transaction_list_fragment.xml
app/src/main/res/layout/transaction_list_row.xml
app/src/main/res/values/colors.xml

diff --git a/app/src/main/res/drawable/dashed_border_1dp.xml b/app/src/main/res/drawable/dashed_border_1dp.xml
new file mode 100644 (file)
index 0000000..25016e1
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+  ~ Copyright © 2018 Damyan Ivanov.
+  ~ This file is part of Mobile-Ledger.
+  ~ Mobile-Ledger 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.
+  ~
+  ~ Mobile-Ledger 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 Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
+  -->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="line"
+    android:thickness="1dp"
+    android:tint="@color/header_border">
+    <stroke
+        android:width="1dp"
+        android:color="@color/colorPrimaryDark"
+        android:dashWidth="2dp"
+        android:dashGap="6dp" />
+
+</shape>
\ No newline at end of file
index 09f5611e1c9787d82c3b2c87893bcd29e7e010f7..b21a10c8f95790d1b6c4f4f8d2d61cd3d5c580d4 100644 (file)
@@ -20,7 +20,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/transaction_list"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
+    android:layout_height="match_parent"
     app:layout_behavior="@string/appbar_scrolling_view_behavior"
     app:layout_constraintBottom_toBottomOf="parent"
     tools:context=".TransactionListActivity">
index 692e554b90772ed14b6b11717428610fc34dd670..fb5d44ed31272fbb74335a6612464976e0b709bd 100644 (file)
             app:layout_constraintEnd_toEndOf="parent" />
     </LinearLayout>
 
+    <LinearLayout
+        android:id="@+id/transaction_row_header_border"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/dashed_border_1dp"
+        android:minHeight="2dp"
+        android:orientation="horizontal"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/transaction_row_head"></LinearLayout>
+
     <LinearLayout
         android:id="@+id/transaction_row_acc_amounts"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
         android:layout_weight="5"
         android:orientation="vertical"
-        app:layout_constraintTop_toBottomOf="@id/transaction_row_description">
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/transaction_row_header_border">
 
         <LinearLayout
             android:id="@+id/account_row_account_row"
             android:gravity="center_vertical"
             android:orientation="horizontal"
             android:paddingStart="8dp"
-            android:paddingEnd="8dp">
+            android:paddingEnd="0dp">
 
             <TextView
                 android:id="@+id/account_row_acc_name"
-                style="@style/account_summary_account_name"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="5"
                 android:text="Account name, a really long one. A very very very long one. It may even spawn on more than two lines -- three, four or more."
+                android:textAlignment="viewStart"
                 tools:ignore="HardcodedText" />
 
             <TextView
                 android:id="@+id/account_row_acc_amounts"
-                style="@style/account_summary_amounts"
-                android:text="123,45\n678,90"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="0dp"
+                android:minWidth="60dp"
+                android:text="123,45\n-14 678,90"
+                android:textAlignment="viewEnd"
                 tools:ignore="HardcodedText" />
         </LinearLayout>
     </LinearLayout>
index 7d1c6fa890f5c4b703f29ca9591706215115a977..09da57b39dc043d48826c7bc91c88aebea975781 100644 (file)
@@ -23,4 +23,5 @@
     <color name="table_row_even_bg">#289d29b1</color>
     <color name="drawer_background">#ffffffff</color>
     <color name="table_row_odd_bg">#28fae0ff</color>
+    <color name="header_border">#804a148c</color>
 </resources>