From 8d0178dff09a762bc6b854474a06e1d6484c10f4 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 23 Feb 2022 22:41:42 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../com/tangem/tap/common/extensions/Picasso.kt | 17 +++++++++++------ .../main/res/layout/item_currency_wallet.xml | 2 +- app/src/main/res/layout/item_popular_token.xml | 2 +- .../layout/layout_balance_wallet_details.xml | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt b/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt index f34b5e9ecf..0e61ba565c 100644 --- a/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt +++ b/app/src/main/java/com/tangem/tap/common/extensions/Picasso.kt @@ -4,6 +4,7 @@ import android.graphics.PorterDuff import android.net.Uri import android.widget.ImageView import android.widget.TextView +import androidx.constraintlayout.utils.widget.ImageFilterView import androidx.core.content.ContextCompat import com.squareup.picasso.Callback import com.squareup.picasso.Picasso @@ -14,7 +15,7 @@ import com.tangem.tap.domain.extensions.getCustomIconUrl import com.tangem.wallet.R fun Picasso.loadCurrenciesIcon( - imageView: ImageView, + imageView: ImageFilterView, textView: TextView, token: Token? = null, blockchain: Blockchain, @@ -54,7 +55,7 @@ fun Picasso.loadCurrenciesIcon( imageView.colorFilter = null textView.text = null } - if (blockchain.isTestnet()) imageView.tint(R.color.tint) + if (blockchain.isTestnet()) imageView.saturation = 0f } }) } @@ -68,7 +69,7 @@ private const val QCX = "QCX" private const val VOYR = "VOYRME" private fun setOfflineCurrencyImage( - imageView: ImageView, + imageView: ImageFilterView, textView: TextView, token: Token?, blockchain: Blockchain, @@ -89,7 +90,7 @@ fun ImageView.tint(colorRes: Int) { } private fun setBlockchainImage( - imageView: ImageView, + imageView: ImageFilterView, textView: TextView, blockchain: Blockchain, ) { @@ -99,11 +100,15 @@ private fun setBlockchainImage( } private fun setTokenImage( - imageView: ImageView, + imageView: ImageFilterView, textView: TextView, token: Token, ) { imageView.setImageResource(R.drawable.shape_circle) - imageView.setColorFilter(token.getColor()) + if (token.blockchain.isTestnet()) { + imageView.saturation = 0f + } else { + imageView.setColorFilter(token.getColor()) + } textView.text = token.symbol.take(1) } diff --git a/app/src/main/res/layout/item_currency_wallet.xml b/app/src/main/res/layout/item_currency_wallet.xml index f489fd8244..35b4a700af 100644 --- a/app/src/main/res/layout/item_currency_wallet.xml +++ b/app/src/main/res/layout/item_currency_wallet.xml @@ -20,7 +20,7 @@ android:layout_height="wrap_content" android:minHeight="76dp"> - - -