Updated on 2026-08-14

This commit is contained in:
Tangem 2026-05-13 17:45:24 +02:00
parent 0b78c692ee
commit 16ebea436f
10 changed files with 101 additions and 79 deletions

View file

@ -94,16 +94,17 @@ fun TangemHeaderRow(
AnimatedVisibility(
visible = subtitle != null,
) {
val wrappedSubtitle = remember(this) { requireNotNull(subtitle) }
Text(
text = wrappedSubtitle.orMaskWithStars(isBalanceHidden).resolveAnnotatedReference(),
style = TangemTheme.typography2.captionSemibold12,
color = TangemTheme.colors2.text.neutral.secondary,
maxLines = 1,
modifier = Modifier
.testTag(tag = TokenElementsTestTags.TOKEN_CRYPTO_AMOUNT)
.padding(start = TangemTheme.dimens2.x1),
)
if (subtitle != null) {
Text(
text = subtitle.orMaskWithStars(isBalanceHidden).resolveAnnotatedReference(),
style = TangemTheme.typography2.captionSemibold12,
color = TangemTheme.colors2.text.neutral.secondary,
maxLines = 1,
modifier = Modifier
.testTag(tag = TokenElementsTestTags.TOKEN_CRYPTO_AMOUNT)
.padding(start = TangemTheme.dimens2.x1),
)
}
}
SpacerWMax()
TangemRowTail(tangemRowTailUM = tailUM)
@ -165,16 +166,17 @@ fun TangemHeaderRow(
AnimatedVisibility(
visible = subtitle != null,
) {
val wrappedSubtitle = remember(this) { requireNotNull(subtitle) }
Text(
text = wrappedSubtitle.orMaskWithStars(isBalanceHidden).resolveAnnotatedReference(),
style = TangemTheme.typography2.captionSemibold12,
color = TangemTheme.colors2.text.neutral.secondary,
maxLines = 1,
modifier = Modifier
.testTag(tag = TokenElementsTestTags.TOKEN_CRYPTO_AMOUNT)
.padding(start = TangemTheme.dimens2.x1),
)
if (subtitle != null) {
Text(
text = subtitle.orMaskWithStars(isBalanceHidden).resolveAnnotatedReference(),
style = TangemTheme.typography2.captionSemibold12,
color = TangemTheme.colors2.text.neutral.secondary,
maxLines = 1,
modifier = Modifier
.testTag(tag = TokenElementsTestTags.TOKEN_CRYPTO_AMOUNT)
.padding(start = TangemTheme.dimens2.x1),
)
}
}
SpacerWMax()
TangemRowTail(

View file

@ -263,41 +263,41 @@ private fun TangemTopBarTitle(title: TextReference?, @DrawableRes titleIconRes:
enter = slideInVertically(initialOffsetY = { it / 2 }) + fadeIn(),
exit = slideOutVertically(targetOffsetY = { it / 2 }) + fadeOut(),
) {
val wrappedTitle = remember(this) { requireNotNull(title) }
Row(
horizontalArrangement = Arrangement.spacedBy(
space = TangemTheme.dimens2.x1,
alignment = Alignment.CenterHorizontally,
),
verticalAlignment = Alignment.CenterVertically,
) {
AnimatedVisibility(
visible = titleIconRes != null,
label = "Title Icon Visibility",
if (title != null) {
Row(
horizontalArrangement = Arrangement.spacedBy(
space = TangemTheme.dimens2.x1,
alignment = Alignment.CenterHorizontally,
),
verticalAlignment = Alignment.CenterVertically,
) {
val wrappedTitleIconRes = remember(this) {
requireNotNull(titleIconRes)
AnimatedVisibility(
visible = titleIconRes != null,
label = "Title Icon Visibility",
) {
val wrappedTitleIconRes = remember(this) {
requireNotNull(titleIconRes)
}
Icon(
imageVector = ImageVector.vectorResource(id = wrappedTitleIconRes),
contentDescription = null,
tint = TangemTheme.colors2.graphic.neutral.primary,
modifier = Modifier.size(TangemTheme.dimens2.x4),
)
}
Icon(
imageVector = ImageVector.vectorResource(id = wrappedTitleIconRes),
contentDescription = null,
tint = TangemTheme.colors2.graphic.neutral.primary,
modifier = Modifier.size(TangemTheme.dimens2.x4),
Text(
text = title.resolveAnnotatedReference(),
color = TangemTheme.colors2.text.neutral.primary,
style = TangemTheme.typography2.headingSemibold17,
textAlign = TextAlign.Center,
maxLines = 1,
autoSize = TextAutoSize.StepBased(
minFontSize = TangemTheme.typography2.captionRegular12.fontSize,
maxFontSize = TangemTheme.typography2.headingSemibold17.fontSize,
),
)
}
Text(
text = wrappedTitle.resolveAnnotatedReference(),
color = TangemTheme.colors2.text.neutral.primary,
style = TangemTheme.typography2.headingSemibold17,
textAlign = TextAlign.Center,
maxLines = 1,
autoSize = TextAutoSize.StepBased(
minFontSize = TangemTheme.typography2.captionRegular12.fontSize,
maxFontSize = TangemTheme.typography2.headingSemibold17.fontSize,
),
)
}
}
}