Updated on 2026-08-14
This commit is contained in:
parent
9d5a56d97a
commit
beffbaa16d
8 changed files with 40 additions and 6 deletions
|
|
@ -3,7 +3,7 @@ package com.tangem.core.ui.extensions
|
|||
import androidx.annotation.DrawableRes
|
||||
import com.tangem.core.ui.R
|
||||
|
||||
@Suppress("ComplexMethod")
|
||||
@Suppress("ComplexMethod", "LongMethod")
|
||||
@DrawableRes
|
||||
fun getActiveIconRes(blockchainId: String): Int {
|
||||
return when (blockchainId) {
|
||||
|
|
@ -71,11 +71,12 @@ fun getActiveIconRes(blockchainId: String): Int {
|
|||
"koinos", "koinos/test" -> R.drawable.img_koinos_22
|
||||
"bittensor" -> R.drawable.img_bittensor_22
|
||||
"blast", "blast/test" -> R.drawable.img_blast_22
|
||||
"filecoin" -> R.drawable.img_filecoin_22
|
||||
else -> R.drawable.ic_alert_24
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("ComplexMethod")
|
||||
@Suppress("ComplexMethod", "LongMethod")
|
||||
@DrawableRes
|
||||
fun getActiveIconResByNetworkId(networkId: String): Int {
|
||||
return when (networkId) {
|
||||
|
|
@ -143,6 +144,7 @@ fun getActiveIconResByNetworkId(networkId: String): Int {
|
|||
"koinos", "koinos/test" -> R.drawable.img_koinos_22
|
||||
"bittensor" -> R.drawable.img_bittensor_22
|
||||
"blast", "blast/test" -> R.drawable.img_blast_22
|
||||
"filecoin" -> R.drawable.img_filecoin_22
|
||||
else -> R.drawable.ic_alert_24
|
||||
}
|
||||
}
|
||||
|
|
@ -212,11 +214,12 @@ fun getActiveIconResByCoinId(coinId: String): Int {
|
|||
"koinos", "koinos/test" -> R.drawable.img_koinos_22
|
||||
"bittensor" -> R.drawable.img_bittensor_22
|
||||
"blast", "blast/test" -> R.drawable.img_blast_22
|
||||
"filecoin" -> R.drawable.img_filecoin_22
|
||||
else -> R.drawable.ic_alert_24
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("ComplexMethod")
|
||||
@Suppress("ComplexMethod", "LongMethod")
|
||||
@DrawableRes
|
||||
fun getGreyedOutIconRes(blockchainId: String): Int {
|
||||
return when (blockchainId) {
|
||||
|
|
@ -284,11 +287,12 @@ fun getGreyedOutIconRes(blockchainId: String): Int {
|
|||
"koinos", "koinos/test" -> R.drawable.ic_koinos_22
|
||||
"bittensor" -> R.drawable.ic_bittensor_22
|
||||
"blast", "blast/test" -> R.drawable.ic_blast_22
|
||||
"filecoin" -> R.drawable.ic_filecoin_22
|
||||
else -> R.drawable.ic_alert_24
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("ComplexMethod")
|
||||
@Suppress("ComplexMethod", "LongMethod")
|
||||
@DrawableRes
|
||||
fun getGreyedOutIconResByNetworkId(networkId: String): Int {
|
||||
return when (networkId) {
|
||||
|
|
@ -356,6 +360,7 @@ fun getGreyedOutIconResByNetworkId(networkId: String): Int {
|
|||
"koinos", "koinos/test" -> R.drawable.ic_koinos_22
|
||||
"bittensor" -> R.drawable.ic_bittensor_22
|
||||
"blast", "blast/test" -> R.drawable.ic_blast_22
|
||||
"filecoin" -> R.drawable.ic_filecoin_22
|
||||
else -> R.drawable.ic_alert_24
|
||||
}
|
||||
}
|
||||
10
core/ui/src/main/res/drawable/ic_filecoin_22.xml
Normal file
10
core/ui/src/main/res/drawable/ic_filecoin_22.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<path
|
||||
android:pathData="M12.045,9.68L11.715,11.44L14.85,11.88L14.63,12.705L11.55,12.265C11.33,12.98 11.22,13.75 10.945,14.41C10.67,15.18 10.395,15.95 10.065,16.665C9.625,17.6 8.855,18.26 7.81,18.425C7.205,18.535 6.545,18.48 6.05,18.095C5.885,17.985 5.72,17.765 5.72,17.6C5.72,17.38 5.83,17.105 5.995,16.995C6.105,16.94 6.38,16.995 6.545,17.05C6.71,17.215 6.875,17.435 6.985,17.655C7.315,18.095 7.755,18.15 8.195,17.82C8.69,17.38 8.965,16.775 9.13,16.17C9.46,14.85 9.79,13.585 10.065,12.265V12.045L7.15,11.605L7.26,10.78L10.285,11.22L10.67,9.515L7.535,9.02L7.645,8.14L10.89,8.58C11,8.25 11.055,7.975 11.165,7.7C11.44,6.71 11.715,5.72 12.375,4.84C13.035,3.96 13.805,3.41 14.96,3.465C15.455,3.465 15.95,3.63 16.28,4.015C16.335,4.07 16.445,4.18 16.445,4.29C16.445,4.51 16.445,4.785 16.28,4.95C16.06,5.115 15.785,5.06 15.565,4.84C15.4,4.675 15.29,4.51 15.125,4.345C14.795,3.905 14.3,3.85 13.915,4.235C13.64,4.51 13.365,4.895 13.2,5.28C12.815,6.435 12.54,7.645 12.155,8.855L15.18,9.295L14.96,10.12L12.045,9.68Z"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd" />
|
||||
</vector>
|
||||
16
core/ui/src/main/res/drawable/img_filecoin_22.xml
Normal file
16
core/ui/src/main/res/drawable/img_filecoin_22.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="22dp"
|
||||
android:height="22dp"
|
||||
android:viewportWidth="22"
|
||||
android:viewportHeight="22">
|
||||
<group>
|
||||
<clip-path android:pathData="M11,0L11,0A11,11 0,0 1,22 11L22,11A11,11 0,0 1,11 22L11,22A11,11 0,0 1,0 11L0,11A11,11 0,0 1,11 0z" />
|
||||
<path
|
||||
android:pathData="M11,0L11,0A11,11 0,0 1,22 11L22,11A11,11 0,0 1,11 22L11,22A11,11 0,0 1,0 11L0,11A11,11 0,0 1,11 0z"
|
||||
android:fillColor="#0090FF" />
|
||||
<path
|
||||
android:pathData="M12.045,9.68L11.715,11.44L14.85,11.88L14.63,12.705L11.55,12.265C11.33,12.98 11.22,13.75 10.945,14.41C10.67,15.18 10.395,15.95 10.065,16.665C9.625,17.6 8.855,18.26 7.81,18.425C7.205,18.535 6.545,18.48 6.05,18.095C5.885,17.985 5.72,17.765 5.72,17.6C5.72,17.38 5.83,17.105 5.995,16.995C6.105,16.94 6.38,16.995 6.545,17.05C6.71,17.215 6.875,17.435 6.985,17.655C7.315,18.095 7.755,18.15 8.195,17.82C8.69,17.38 8.965,16.775 9.13,16.17C9.46,14.85 9.79,13.585 10.065,12.265V12.045L7.15,11.605L7.26,10.78L10.285,11.22L10.67,9.515L7.535,9.02L7.645,8.14L10.89,8.58C11,8.25 11.055,7.975 11.165,7.7C11.44,6.71 11.715,5.72 12.375,4.84C13.035,3.96 13.805,3.41 14.96,3.465C15.455,3.465 15.95,3.63 16.28,4.015C16.335,4.07 16.445,4.18 16.445,4.29C16.445,4.51 16.445,4.785 16.28,4.95C16.06,5.115 15.785,5.06 15.565,4.84C15.4,4.675 15.29,4.51 15.125,4.345C14.795,3.905 14.3,3.85 13.915,4.235C13.64,4.51 13.365,4.895 13.2,5.28C12.815,6.435 12.54,7.645 12.155,8.855L15.18,9.295L14.96,10.12L12.045,9.68Z"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd" />
|
||||
</group>
|
||||
</vector>
|
||||
Loading…
Add table
Add a link
Reference in a new issue