]> git.ktnx.net Git - mobile-ledger.git/commitdiff
visual enhancements of the account list
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 16 Jul 2020 15:39:44 +0000 (15:39 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 16 Jul 2020 15:39:44 +0000 (15:39 +0000)
equal three-row height for default rows. expands when the amounts
are expanded, but the account name stays at the top

app/src/main/res/layout/account_summary_row.xml
app/src/main/res/values-night/styles.xml
app/src/main/res/values/styles.xml

index 66a373f980ed37db7c1691182f54339f99d2d333..ab8294f84b3c21b94cd2b15ab1dd1a1ca2608ba9 100644 (file)
     android:id="@+id/account_summary_row"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:animateLayoutChanges="true"
     android:longClickable="true"
-    android:minHeight="@dimen/thumb_row_height"
     >
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/account_name_layout"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toStartOf="@+id/account_row_acc_amounts"
         app:layout_constraintHorizontal_chainStyle="spread_inside"
         app:layout_constraintHorizontal_weight="3"
             android:layout_marginStart="8dp"
             android:gravity="center_vertical"
             android:longClickable="true"
-            android:onClick="onAccountSummaryRowViewClicked"
+            android:minHeight="@dimen/default_account_row_height"
             android:paddingStart="8dp"
-            android:text="AccountNameALongOne"
+            android:text="AccountName"
             android:textAppearance="@android:style/TextAppearance.Material.Medium"
             app:layout_constrainedWidth="true"
-            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/account_expander_container"
             app:layout_constraintHorizontal_bias="0.0"
             app:layout_constraintHorizontal_chainStyle="packed"
 
         <androidx.constraintlayout.widget.ConstraintLayout
             android:id="@+id/account_expander_container"
-            android:layout_width="@dimen/thumb_row_height"
-            android:layout_height="@dimen/thumb_row_height"
+            android:layout_width="@dimen/default_account_row_height"
+            android:layout_height="@dimen/default_account_row_height"
             android:foregroundGravity="center_vertical"
-            android:minHeight="@dimen/thumb_row_height"
-            android:onClick="onAccountSummaryRowViewClicked"
+            android:minHeight="@dimen/default_account_row_height"
             app:layout_constraintBottom_toBottomOf="@id/account_row_acc_name"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toEndOf="@id/account_row_acc_name"
@@ -82,7 +79,6 @@
                 android:backgroundTint="?colorPrimary"
                 android:clickable="true"
                 android:focusable="true"
-                android:onClick="onAccountSummaryRowViewClicked"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
@@ -98,6 +94,7 @@
         android:layout_marginStart="12dp"
         android:layout_marginEnd="8dp"
         android:gravity="center_vertical"
+        android:minHeight="@dimen/default_account_row_height"
         android:onClick="onAccountSummaryRowViewClicked"
         android:text="USD 123,45\n678,90\nIRAUSD -17 000.00"
         android:textAppearance="@style/TextAppearance.AppCompat.Medium"
index 1b393b6031b2da0da78dc40123c8bcad1b62944a..1b39c9e236cdf3abee0725ed9771b1c7308f41d7 100644 (file)
     </style>
 
     <dimen name="thumb_row_height">48dp</dimen>
+    <dimen name="default_account_row_height">64.2857sp</dimen>
 </resources>
index a25fb60808863af6b478e618f54522504389f5f1..5778f7a5d55dc18632b1a33a00cbc8b36e472a7e 100644 (file)
     </style>
 
     <dimen name="thumb_row_height">48dp</dimen>
+    <!-- px=rows×73+12-->
+    <!-- sp=px÷3.5 -->
+    <dimen name="default_account_row_height">64.2857sp</dimen>
 </resources>