]> git.ktnx.net Git - mobile-ledger.git/commitdiff
yet another attempt to improve layout of transaction list
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 17 Jun 2020 20:42:58 +0000 (23:42 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 17 Jun 2020 20:42:58 +0000 (23:42 +0300)
app/src/main/res/layout/transaction_list_row.xml
app/src/main/res/layout/transaction_list_row_accounts_table_row.xml
app/src/main/res/values/attr.xml
app/src/main/res/values/styles.xml

index a3afe2f78460acfbcaab5256950f7de181199135..0de115b130b230b238f80fe144e729df67da9506 100644 (file)
@@ -32,8 +32,9 @@
         android:layout_height="wrap_content"
         android:layout_margin="8dp"
         android:visibility="visible"
-        app:cardCornerRadius="4dp"
+        app:cardBackgroundColor="?table_row_light_bg"
         app:cardUseCompatPadding="false"
+        app:cardCornerRadius="0dp"
         >
 
         <androidx.constraintlayout.widget.ConstraintLayout
@@ -42,7 +43,6 @@
             android:layout_height="wrap_content"
             android:gravity="center_vertical"
             android:minHeight="36dp"
-            android:orientation="horizontal"
             android:padding="8dp"
             >
 
 
                 <TextView
                     android:id="@+id/transaction_row_description"
-                    style="@style/account_summary_account_name"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:text="---."
+                    android:textColor="?textColor"
                     android:textAppearance="@android:style/TextAppearance.Material.Medium"
+                    android:textStyle="bold"
                     tools:ignore="HardcodedText"
                     />
                 <TextView
                     android:id="@+id/transaction_comment"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="8dp"
+                    android:layout_marginStart="0dp"
+                    android:layout_marginTop="0dp"
                     android:text="Comment text"
-                    android:textStyle="italic"
+                    android:textAppearance="@android:style/TextAppearance.Material.Small"
+                    android:textColor="?commentColor"
                     tools:ignore="HardcodedText"
                     />
             </LinearLayout>
@@ -81,7 +84,6 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="8dp"
-                android:layout_weight="5"
                 android:orientation="vertical"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
index 67a5add2407258792c14f375d1b93a3264c6d2a9..e87afbef7a3b970d7f28071b861f31b38d605c75 100644 (file)
             android:layout_height="wrap_content"
             android:text="another acc name"
             android:textAlignment="viewStart"
-            android:textAppearance="@android:style/TextAppearance.Material.Small"
-            android:textColor="@android:color/secondary_text_light"
+            android:textAppearance="@android:style/TextAppearance.Material.Medium"
+            android:textColor="?textColor"
             android:textStyle="normal"
-            tools:ignore="HardcodedText" />
+            tools:ignore="HardcodedText"
+            />
 
         <TextView
             android:id="@+id/transaction_list_acc_row_acc_comment"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:alpha="0.75"
-            android:paddingStart="8dp"
+            android:layout_marginStart="8dp"
+            android:layout_marginTop="-4dp"
             android:text="account comment"
             android:textAlignment="viewStart"
             android:textAppearance="@android:style/TextAppearance.Material.Small"
-            android:textColor="@android:color/secondary_text_light"
-            android:textStyle="italic"
-            tools:ignore="HardcodedText,RtlSymmetry" />
+            android:textColor="?commentColor"
+            tools:ignore="HardcodedText,RtlSymmetry"
+            />
     </LinearLayout>
 
     <TextView
@@ -64,5 +65,6 @@
         android:minWidth="60dp"
         android:text="---,--"
         android:textAlignment="viewEnd"
+        android:textColor="?textColor"
         tools:ignore="HardcodedText" />
 </LinearLayout>
index afb1fc06f3ab6545ac48c6a0c8cf3865a87ed5f6..2773205098773ecbe2df5bcf50aaf8c8b938496c 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ~ Copyright © 2019 Damyan Ivanov.
+  ~ Copyright © 2020 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
@@ -21,6 +21,7 @@
     <attr name="table_row_dark_bg" format="reference|color"/>
     <attr name="table_row_light_bg" format="reference|color"/>
     <attr name="textColor" format="reference|color"/>
+    <attr name="commentColor" format="reference|color" />
     <attr name="colorPrimaryTransparent" format="reference|color" />
 
 </resources>
\ No newline at end of file
index b0c366d23b9872f4d7e653d9c182e8ddddf1f818..be6a9026ff9d3ee439c5cee2f1e36819931fba0c 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  ~ Copyright © 2019 Damyan Ivanov.
+  ~ Copyright © 2020 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
         <item name="table_row_light_bg">#28ddcbff</item>
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>
-        <item name="textColor">#707070</item>
+        <item name="textColor">#686868</item>
+        <item name="commentColor">#909090</item>
         <item name="colorOnSecondary">@android:color/white</item>
-        <item name="textInputStyle">@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense</item>
+        <item name="textInputStyle">
+            @style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense
+        </item>
         <item name="colorError">#FFE1E2</item>
         <item name="colorOnError">#CD1609</item>
         <item name="floatingActionButtonStyle">@style/myFabStyle</item>