TP-29127 | content scale type added for lottie render (#61)
* TP-29127 | content scale type added for lottiee render
This commit is contained in:
committed by
GitHub Enterprise
parent
cf1e812e4b
commit
d3922a43bb
@@ -7,4 +7,6 @@
|
||||
|
||||
package com.navi.uitron.model.ui
|
||||
|
||||
class LottieProperty : BaseProperty()
|
||||
data class LottieProperty(
|
||||
val contentScale: String? = null
|
||||
) : BaseProperty()
|
||||
@@ -33,6 +33,7 @@ import com.navi.uitron.utils.KEY_UI_TRON_DATA
|
||||
import com.navi.uitron.utils.KEY_PROPERTY
|
||||
import com.navi.uitron.viewmodel.UiTronViewModel
|
||||
import customClickable
|
||||
import getContentScale
|
||||
import orFalse
|
||||
import orTrue
|
||||
import setHeight
|
||||
@@ -106,13 +107,15 @@ class LottieRenderer: Renderer<LottieProperty> {
|
||||
LottieAnimation(
|
||||
composition = composition,
|
||||
progress = { it },
|
||||
modifier = modifier
|
||||
modifier = modifier,
|
||||
contentScale = getContentScale(property.contentScale)
|
||||
)
|
||||
}?: run {
|
||||
} ?: run {
|
||||
LottieAnimation(
|
||||
composition = composition,
|
||||
iterations = uiTronLottieData?.iterations ?: 1,
|
||||
modifier = modifier
|
||||
modifier = modifier,
|
||||
contentScale = getContentScale(property.contentScale)
|
||||
)
|
||||
}
|
||||
uiTronLottieData?.placeholderIcon?.takeIf { progress == 0f }?.let {
|
||||
|
||||
@@ -533,5 +533,4 @@ fun getKeyboardOptions(keyboardOptions: OutlinedTextFieldKeyBoardOptions?): Keyb
|
||||
keyboardType = KeyboardUtil.getKeyboardType(keyboardOptions?.keyboardType),
|
||||
imeAction = KeyboardUtil.getImeAction(keyboardOptions?.imeAction)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user