diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt index ac30eebf..ded6d37e 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/AccountTransactionAdapter.kt @@ -38,15 +38,10 @@ open class AccountTransactionAdapter(protected val presenter: BankingPresenter) override fun bindItemToView(viewHolder: AccountTransactionViewHolder, item: AccountTransaction) { viewHolder.txtvwDate.text = ValueDateFormat.format(item.valueDate) - viewHolder.txtvwBookingText.text = item.bookingText ?: "" + val label = if (item.showOtherPartyName) item.otherPartyName else item.bookingText + viewHolder.txtvwTransactionLabel.text = label ?: item.bookingText ?: "" - viewHolder.txtvwOtherPartyName.visibility = if (item.showOtherPartyName) View.VISIBLE else View.GONE - viewHolder.txtvwOtherPartyName.text = item.otherPartyName ?: "" - - viewHolder.txtvwUsage1.text = item.usage - - viewHolder.txtvwUsage2.visibility = View.GONE // TODO - viewHolder.txtvwUsage2.text = "" // TODO + viewHolder.txtvwUsage.text = item.usage viewHolder.txtvwAmount.text = presenter.formatAmount(item.amount) viewHolder.txtvwAmount.setTextColorToColorResource(if (item.amount >= BigDecimal.ZERO) R.color.positiveAmount else R.color.negativeAmount) diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt index 2d64c128..d72ffc02 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/viewholder/AccountTransactionViewHolder.kt @@ -11,13 +11,9 @@ open class AccountTransactionViewHolder(itemView: View) : RecyclerView.ViewHolde val txtvwDate: TextView = itemView.txtvwDate - val txtvwBookingText: TextView = itemView.txtvwBookingText + val txtvwTransactionLabel: TextView = itemView.txtvwTransactionLabel - val txtvwOtherPartyName: TextView = itemView.txtvwOtherPartyName - - val txtvwUsage1: TextView = itemView.txtvwUsage1 - - val txtvwUsage2: TextView = itemView.txtvwUsage2 + val txtvwUsage: TextView = itemView.txtvwUsage val txtvwAmount: TextView = itemView.txtvwAmount diff --git a/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml b/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml index cab2c7db..3b7d0169 100644 --- a/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml +++ b/ui/BankingAndroidApp/src/main/res/layout/list_item_account_transaction.xml @@ -24,31 +24,20 @@ > + android:id="@+id/txtvwTransactionLabel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/list_item_account_transaction_space_between_label_and_usage" + android:textSize="@dimen/list_item_account_transaction_label_text_size" + android:textStyle="bold" + /> - - - - + android:id="@+id/txtvwUsage" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="@dimen/list_item_account_transaction_usage_text_size" + /> diff --git a/ui/BankingAndroidApp/src/main/res/values/dimens.xml b/ui/BankingAndroidApp/src/main/res/values/dimens.xml index 3c351a87..ceac6e61 100644 --- a/ui/BankingAndroidApp/src/main/res/values/dimens.xml +++ b/ui/BankingAndroidApp/src/main/res/values/dimens.xml @@ -14,16 +14,18 @@ 16dp 42dp - 100dp + 80dp 4dp + 2dp + 16sp + 14sp 16dp - 8dp - 12dp + 0dp + 2dp 70dp - 12dp - 8dp + 2dp + 0dp 4dp - 6dp 4dp 24dp