Updated on 2026-08-14
This commit is contained in:
commit
047f78de7e
6 changed files with 25 additions and 16 deletions
|
|
@ -38,7 +38,7 @@ android {
|
|||
}
|
||||
debug_beta {
|
||||
initWith release
|
||||
debuggable true
|
||||
debuggable false
|
||||
versionNameSuffix "-beta"
|
||||
applicationIdSuffix ".debug"
|
||||
buildConfigField 'String', 'CONFIG_ENVIRONMENT', '\"prod\"'
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class WarningMessagesManager(
|
|||
"",
|
||||
type = WarningMessage.Type.TestCard,
|
||||
priority = WarningMessage.Priority.Critical,
|
||||
listOf(WarningMessage.Location.MainScreen),
|
||||
listOf(WarningMessage.Location.MainScreen, WarningMessage.Location.SendScreen),
|
||||
null,
|
||||
R.string.alert_title,
|
||||
R.string.warning_testnet_card_message,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:minHeight="76dp">
|
||||
|
||||
<ImageView
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
android:id="@+id/iv_currency"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
@ -119,17 +119,21 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tv_status_error_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textColor="@color/warning"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_amount_fiat"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_currency"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline" />
|
||||
app:layout_constraintTop_toTopOf="@id/guideline"
|
||||
tools:text="@string/lorem_ipsum" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status_loading"
|
||||
|
|
@ -166,13 +170,13 @@
|
|||
android:id="@+id/tv_amount_fiat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textColor="@color/darkGray2"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_exchange_rate"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_exchange_rate"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline"
|
||||
tools:text="0.43 USD" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
android:background="@android:color/white"
|
||||
android:minHeight="60dp">
|
||||
|
||||
<ImageView
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
android:id="@+id/iv_currency"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/tv_amount"
|
||||
tools:text="3.588 ETH" />
|
||||
|
||||
<ImageView
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
android:id="@+id/iv_currency"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue