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 7414bc64..b81d0474 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 @@ -1,5 +1,6 @@ package net.dankito.banking.ui.android.adapter +import android.net.Uri import android.view.ContextMenu import android.view.View import net.dankito.banking.ui.android.R @@ -49,6 +50,15 @@ open class AccountTransactionAdapter(protected val presenter: BankingPresenter) viewHolder.txtvwAmount.text = presenter.formatAmount(item.amount) viewHolder.txtvwAmount.setTextColorToColorResource(if (item.amount >= BigDecimal.ZERO) R.color.positiveAmount else R.color.negativeAmount) + + val iconUrl = item.bankAccount.account.bank.iconUrl + if (iconUrl != null && presenter.areAllAccountSelected) { + viewHolder.imgvwBankIcon.visibility = View.VISIBLE + viewHolder.imgvwBankIcon.setImageURI(Uri.parse(iconUrl)) + } + else { + viewHolder.imgvwBankIcon.visibility = View.GONE + } } 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 1453f743..2d64c128 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 @@ -1,6 +1,7 @@ package net.dankito.banking.ui.android.adapter.viewholder import android.view.View +import android.widget.ImageView import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import kotlinx.android.synthetic.main.list_item_account_transaction.view.* @@ -20,4 +21,6 @@ open class AccountTransactionViewHolder(itemView: View) : RecyclerView.ViewHolde val txtvwAmount: TextView = itemView.txtvwAmount + val imgvwBankIcon: ImageView = itemView.imgvwBankIcon + } \ No newline at end of file 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 05866406..cab2c7db 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 @@ -53,7 +53,7 @@ - + + - + \ No newline at end of file diff --git a/ui/BankingAndroidApp/src/main/res/values/dimens.xml b/ui/BankingAndroidApp/src/main/res/values/dimens.xml index d626d92e..90399b83 100644 --- a/ui/BankingAndroidApp/src/main/res/values/dimens.xml +++ b/ui/BankingAndroidApp/src/main/res/values/dimens.xml @@ -16,8 +16,12 @@ 100dp 4dp + 16dp + 8dp + 12dp 70dp 12dp + 8dp 4dp 6dp