]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix auto-complete account list amounts alignment
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 May 2021 15:19:56 +0000 (18:19 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 May 2021 15:19:56 +0000 (18:19 +0300)
similar improvement can be made to the main account list

app/src/main/res/layout/account_autocomplete_row.xml

index 19ea353345678431cc0cce8a237621edbfce187b..f30c7061b659a1679a5bd97e2e5ac5e327bd5e75 100644 (file)
 
     <TextView
         android:id="@+id/account_name"
-        android:layout_width="0dp"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="TextView\non two lines"
+        android:text="TextView with a very long account name. a really long account name that needs to one\non two lines"
         android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
         />
     <TextView
         android:id="@+id/amounts"
-        android:layout_width="0dp"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="@dimen/text_margin"
         android:gravity="end"
-        android:text="TextView"
+        android:text="LongCurrencyName 1 234 567,89"
         android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/account_name"
+        android:textColor="?commentColor"
         app:layout_goneMarginStart="0dp"
         />
+    <androidx.constraintlayout.helper.widget.Flow
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:constraint_referenced_ids="account_name,amounts"
+        app:flow_firstHorizontalBias="0"
+        app:flow_firstHorizontalStyle="spread_inside"
+        app:flow_horizontalBias="1"
+        app:flow_verticalStyle="spread_inside"
+        app:flow_wrapMode="chain"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        />
 </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file