NTP-8837 | CLoU Pre and Post Payment HP Experience (#623)
This commit is contained in:
@@ -9,6 +9,7 @@ package com.navi.uitron.render
|
||||
|
||||
import androidx.compose.foundation.Canvas
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.ui.Modifier
|
||||
@@ -86,6 +87,7 @@ class LinearProgressIndicatorWithThumbRenderer(private val uiTronRenderer: UiTro
|
||||
uiTronViewModel
|
||||
)
|
||||
.setIdModifiers()
|
||||
.setMargin()
|
||||
.setSizeModifiers()
|
||||
.setClipShape()
|
||||
.setPadding()
|
||||
@@ -95,6 +97,7 @@ class LinearProgressIndicatorWithThumbRenderer(private val uiTronRenderer: UiTro
|
||||
(modifier ?: Modifier)
|
||||
.setTag(property)
|
||||
.customOffset(property.offset)
|
||||
.setPadding(property.margin)
|
||||
.setWidth(property.width)
|
||||
.setHeight(property.height)
|
||||
.setHeightRange(property.heightRange)
|
||||
@@ -143,8 +146,10 @@ class LinearProgressIndicatorWithThumbRenderer(private val uiTronRenderer: UiTro
|
||||
) {
|
||||
Layout(
|
||||
{
|
||||
Box(modifier = Modifier.layoutId(Components.THUMB)) { Thumb(thumb) }
|
||||
Box(modifier = Modifier.layoutId(Components.TRACK)) {
|
||||
Box(modifier = Modifier.wrapContentHeight().layoutId(Components.THUMB)) {
|
||||
Thumb(thumb)
|
||||
}
|
||||
Box(modifier = Modifier.wrapContentHeight().layoutId(Components.TRACK)) {
|
||||
Track(
|
||||
trackWidth,
|
||||
trackHeight,
|
||||
|
||||
@@ -41,6 +41,7 @@ import com.navi.uitron.model.ui.SpannableProperty
|
||||
import com.navi.uitron.model.ui.TextProperty
|
||||
import com.navi.uitron.modifer.ModifierBuilder
|
||||
import com.navi.uitron.utils.EMPTY
|
||||
import com.navi.uitron.utils.SPACE
|
||||
import com.navi.uitron.utils.UiTronBrush
|
||||
import com.navi.uitron.utils.alfredMaskSensitiveComposable
|
||||
import com.navi.uitron.utils.applyImpressionTracking
|
||||
@@ -222,10 +223,10 @@ class SpannableTextRenderer : Renderer<SpannableProperty> {
|
||||
) = buildAnnotatedString {
|
||||
spannableData?.let { data ->
|
||||
data.textMap?.let { textMap ->
|
||||
spanProperties.forEach { spanProperty ->
|
||||
spanProperties.forEachIndexed { index, spanProperty ->
|
||||
if (spanProperty.imageId != null) {
|
||||
appendInlineContent(spanProperty.imageId)
|
||||
append(" ")
|
||||
if (index < spanProperties.size - 1) append(SPACE)
|
||||
} else {
|
||||
textMap[spanProperty.stringId]?.let { textData ->
|
||||
val transformedText =
|
||||
@@ -233,8 +234,12 @@ class SpannableTextRenderer : Renderer<SpannableProperty> {
|
||||
spanProperty.property?.valueTransformation,
|
||||
textData
|
||||
) ?: textData
|
||||
val spaceAppendedText =
|
||||
transformedText.plus(
|
||||
if (index < spanProperties.size - 1) SPACE else EMPTY
|
||||
)
|
||||
val start = this.length
|
||||
val end = start + transformedText.length
|
||||
val end = start + spaceAppendedText.length
|
||||
|
||||
addStyle(
|
||||
style =
|
||||
@@ -246,7 +251,7 @@ class SpannableTextRenderer : Renderer<SpannableProperty> {
|
||||
start = start,
|
||||
end = end
|
||||
)
|
||||
append("$transformedText ")
|
||||
append(spaceAppendedText)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user