TP-61196 | Extra space in gold widget bug fix (#10152)

This commit is contained in:
Apoorv Nigam
2024-03-19 17:05:13 +05:30
committed by GitHub
parent cd6a0f5cb2
commit 34e780dbfe
2 changed files with 8 additions and 2 deletions

View File

@@ -189,7 +189,10 @@ constructor(
)
)
}
tvAction.showWhenDataIsAvailable(showText = info.actionData()?.title)
if (info.actionData()?.title.isNotNullAndNotEmpty()) {
tvAction.showWhenDataIsAvailable(showText = info.actionData()?.title)
binding.tvActionWithImageAndLottie.isVisible = true
}
tvActionWithImageAndLottie.setOnClickListener {
info.actionData()?.metaData?.clickedData?.parameters?.let {
it[AMOUNT] = info.actualAmount().toString()
@@ -326,6 +329,7 @@ constructor(
info.chipData()?.let { chipGroupViewInit(it, info.isDisabled()) }
info.textIconCode()?.let { textIconCode ->
binding.icon.showWhenDataIsAvailable(textIconCode)
binding.tvActionWithImageAndLottie.isVisible = true
}
widgetCallback.getLifeCycle()?.coroutineScope?.launch {
etAmount.post {
@@ -338,6 +342,7 @@ constructor(
}
info.textLottieCode()?.let { textLottieCode ->
binding.lottie.showWhenDataIsAvailable(textLottieCode)
binding.tvActionWithImageAndLottie.isVisible = true
}
}
}

View File

@@ -244,6 +244,7 @@
android:id="@+id/tvActionWithImageAndLottie"
android:layout_width="match_parent"
android:gravity="center"
android:visibility="gone"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/rounded_purple_color_enabled_state"
@@ -258,7 +259,7 @@
android:textColor="@color/white"
android:gravity="center"
android:textSize="@dimen/font_small"
android:visibility="visible"
android:visibility="gone"
tools:text="Sell now"
tools:visibility="visible" />