Set transactions label to max 1 line and usage to max 2 lines

This commit is contained in:
dankito 2020-09-09 16:14:19 +02:00
parent 033a29492d
commit 035b7b3d33
2 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/list_item_account_transaction_space_between_label_and_usage" android:layout_marginBottom="@dimen/list_item_account_transaction_space_between_label_and_usage"
android:lines="1"
android:ellipsize="end"
android:textSize="@dimen/list_item_account_transaction_label_text_size" android:textSize="@dimen/list_item_account_transaction_label_text_size"
android:textStyle="bold" android:textStyle="bold"
/> />
@ -36,6 +38,8 @@
android:id="@+id/txtvwUsage" android:id="@+id/txtvwUsage"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:lines="2"
android:ellipsize="end"
android:textSize="@dimen/list_item_account_transaction_usage_text_size" android:textSize="@dimen/list_item_account_transaction_usage_text_size"
/> />

View File

@ -33,11 +33,13 @@ struct AccountTransactionListItem: View {
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text(getTransactionLabel(transaction)) Text(getTransactionLabel(transaction))
.font(.headline) .font(.headline)
.lineLimit(1)
.frame(height: 20) .frame(height: 20)
Text(transaction.usage) Text(transaction.usage)
.styleAsDetail() .styleAsDetail()
.padding(.top, 4) .padding(.top, 4)
.lineLimit(2)
.frame(height: 46, alignment: .center) .frame(height: 46, alignment: .center)
} }