]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/transaction_list_row.xml
tinted color for the day/month delimiters
[mobile-ledger.git] / app / src / main / res / layout / transaction_list_row.xml
index e35c331ba16276b569c3366c962e2c45bc2ae167..f82cf48ce21c5ad30deedac73371be6dde24e0e1 100644 (file)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
-
 <!--
-  ~ Copyright © 2018 Damyan Ivanov.
+  ~ Copyright © 2019 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
   ~ along with Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
   -->
 
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
+<android.support.v7.widget.ContentFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/transaction_row"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_vertical"
-    android:minHeight="36dp"
-    android:orientation="horizontal"
-    android:paddingStart="8dp"
-    android:paddingEnd="8dp">
-
-    <!--android:button="@drawable/checkbox_star_black"-->
-
-    <TextView
-        android:id="@+id/transaction_row_description"
-        style="@style/account_summary_account_name"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="5"
-        android:text="Sample description goes here."
-        tools:ignore="HardcodedText" />
+    android:layout_height="wrap_content">
 
-    <LinearLayout
-        android:id="@+id/transaction_row_acc_amounts"
+    <android.support.v7.widget.CardView
+        android:id="@+id/transaction_card_view"
         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">
+        android:layout_margin="8dp"
+        android:visibility="gone"
+        app:cardCornerRadius="16dp"
+        app:cardElevation="4dp"
+        app:cardUseCompatPadding="false"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_goneMarginBottom="8dp">
 
-        <LinearLayout
-            android:id="@+id/account_row_account_row"
+        <android.support.constraint.ConstraintLayout
+            android:id="@+id/transaction_row"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:gravity="center_vertical"
+            android:minHeight="36dp"
             android:orientation="horizontal"
-            android:paddingStart="8dp"
-            android:paddingEnd="8dp">
-
-            <TextView
-                android:id="@+id/account_row_acc_name"
-                style="@style/account_summary_account_name"
-                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."
-                tools:ignore="HardcodedText" />
-
-            <TextView
-                android:id="@+id/account_row_acc_amounts"
-                style="@style/account_summary_amounts"
-                android:text="123,45\n678,90"
-                tools:ignore="HardcodedText" />
-        </LinearLayout>
-    </LinearLayout>
-</android.support.constraint.ConstraintLayout>
\ No newline at end of file
+            android:padding="8dp">
+
+            <LinearLayout
+                android:id="@+id/transaction_row_head"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent">
+
+                <TextView
+                    android:id="@+id/transaction_row_description"
+                    style="@style/account_summary_account_name"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="5"
+                    android:text="---."
+                    android:textStyle="bold"
+                    tools:ignore="HardcodedText" />
+
+            </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
+                android:id="@+id/transaction_row_acc_amounts"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="5"
+                android:orientation="vertical"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/transaction_row_header_border">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal"
+                    android:paddingStart="8dp"
+                    android:paddingEnd="0dp">
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="5"
+                        android:text="---"
+                        android:textAlignment="viewStart"
+                        tools:ignore="HardcodedText" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="0dp"
+                        android:minWidth="60dp"
+                        android:text="€ --,--"
+                        android:textAlignment="viewEnd"
+                        tools:ignore="HardcodedText" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal"
+                    android:paddingStart="8dp"
+                    android:paddingEnd="0dp">
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="5"
+                        android:text="---"
+                        android:textAlignment="viewStart"
+                        tools:ignore="HardcodedText" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="0dp"
+                        android:minWidth="60dp"
+                        android:text="---,--"
+                        android:textAlignment="viewEnd"
+                        tools:ignore="HardcodedText" />
+                </LinearLayout>
+            </LinearLayout>
+
+        </android.support.constraint.ConstraintLayout>
+    </android.support.v7.widget.CardView>
+
+    <android.support.constraint.ConstraintLayout
+        android:id="@+id/transaction_delimiter"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginEnd="8dp"
+        android:foregroundGravity="center_vertical"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/transaction_delimiter_month"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="---------"
+            android:textColor="@color/header_border"
+            android:textStyle="bold"
+            app:layout_constraintStart_toStartOf="parent"
+            tools:ignore="HardcodedText" />
+
+        <TextView
+            android:id="@+id/transaction_delimiter_date"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="--.--.----"
+            android:textColor="@color/header_border"
+            android:textStyle="bold"
+            app:layout_constraintEnd_toEndOf="parent"
+            tools:ignore="HardcodedText" />
+
+        <View
+            android:id="@+id/transaction_delimiter_line"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:layout_marginStart="8dp"
+            android:layout_marginEnd="8dp"
+            android:background="@drawable/dashed_border_1dp"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toStartOf="@id/transaction_delimiter_date"
+            app:layout_constraintStart_toEndOf="@id/transaction_delimiter_month"
+            app:layout_constraintTop_toTopOf="parent" />
+
+    </android.support.constraint.ConstraintLayout>
+</android.support.v7.widget.ContentFrameLayout>
\ No newline at end of file