]> git.ktnx.net Git - mobile-ledger.git/commitdiff
better layout of the transaction list running total
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 May 2021 15:26:49 +0000 (18:26 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 May 2021 15:26:49 +0000 (18:26 +0300)
app/src/main/res/layout/transaction_list_row.xml

index 155cdc1042b319cd21a156709b5acab82f778647..a91456ccc7c27c061cfc71a0a60b026810b29101 100644 (file)
                 <include layout="@layout/transaction_list_row_accounts_table_row" />
 
             </LinearLayout>
+            <androidx.constraintlayout.widget.Barrier
+                android:id="@+id/barrier"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                app:barrierDirection="top"
+                app:constraint_referenced_ids="transaction_row_acc_amounts,transaction_running_total"
+                />
+
             <TextView
                 android:id="@+id/transaction_running_total"
                 style="@style/transaction_list_comment"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginStart="@dimen/half_text_margin"
-                android:gravity="top|end"
+                android:gravity="bottom|end"
                 android:text="one two"
                 android:visibility="visible"
                 app:layout_constraintBottom_toBottomOf="@id/transaction_row_acc_amounts"
                 android:id="@+id/transaction_running_total_divider"
                 android:layout_width="1dp"
                 android:layout_height="0dp"
-                android:background="?commentColor"
                 android:layout_marginStart="@dimen/quarter_text_margin"
-                app:layout_goneMarginStart="0dp"
+                android:background="?commentColor"
                 app:layout_constraintBottom_toBottomOf="@id/transaction_running_total"
                 app:layout_constraintStart_toEndOf="@id/transaction_row_acc_amounts"
-                app:layout_constraintTop_toTopOf="@id/transaction_running_total"
+                app:layout_constraintTop_toBottomOf="@id/barrier"
+                app:layout_goneMarginStart="0dp"
                 />
 
         </androidx.constraintlayout.widget.ConstraintLayout>