Updated on 2026-08-14
This commit is contained in:
parent
e90cd6d727
commit
cf2b5f7913
2 changed files with 7 additions and 3 deletions
|
|
@ -10,7 +10,11 @@ import androidx.core.graphics.red
|
|||
/**
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
fun Color.argb(): Int {
|
||||
fun Color.toAndroidGraphicsColor(): Int {
|
||||
val argb = this.toArgb()
|
||||
return android.graphics.Color.argb(argb.alpha, argb.red, argb.green, argb.blue)
|
||||
}
|
||||
|
||||
fun Color.parse(hexColor: String): Color {
|
||||
return Color(hexColor.removePrefix("#").toInt(16))
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ import androidx.compose.ui.viewinterop.AndroidView
|
|||
import com.tangem.tangem_sdk_new.extensions.dpToPx
|
||||
import com.tangem.tap.common.compose.SpacerS16
|
||||
import com.tangem.tap.common.compose.SpacerS24
|
||||
import com.tangem.tap.common.extensions.compose.argb
|
||||
import com.tangem.tap.common.extensions.compose.toAndroidGraphicsColor
|
||||
import com.tangem.wallet.R
|
||||
|
||||
@Composable
|
||||
|
|
@ -95,7 +95,7 @@ fun SubtitleText(subtitleText: String, subtitleTextId: Int?) {
|
|||
textAlignment = View.TEXT_ALIGNMENT_CENTER
|
||||
typeface = Typeface.DEFAULT
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_SP, 20f)
|
||||
setTextColor(color.argb())
|
||||
setTextColor(color.toAndroidGraphicsColor())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue