From 4bd283457bdbd980c96a54d601b9e110f1cbccd1 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 4 Apr 2024 15:15:39 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../ui/recipient/TextFieldWithPaste.kt | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/recipient/TextFieldWithPaste.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/recipient/TextFieldWithPaste.kt index 6109c5ff50..5c0ca33a84 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/recipient/TextFieldWithPaste.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/recipient/TextFieldWithPaste.kt @@ -1,5 +1,8 @@ package com.tangem.features.send.impl.presentation.ui.recipient +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.material3.Text @@ -63,17 +66,29 @@ internal fun TextFieldWithPaste( .padding(top = TangemTheme.dimens.spacing6), ) } - CrossIcon( - onClick = onPasteClick, + AnimatedVisibility( + visible = !isReadOnly, + label = "Animate read only status change", + enter = fadeIn(), + exit = fadeOut(), modifier = Modifier .align(CenterVertically), - ) + ) { + CrossIcon( + onClick = onPasteClick, + ) + } } - if (!isReadOnly) { + AnimatedVisibility( + visible = !isReadOnly, + label = "Animate read only status change", + enter = fadeIn(), + exit = fadeOut(), + modifier = Modifier.align(CenterEnd), + ) { PasteButton( isPasteButtonVisible = value.isBlank(), onClick = onPasteClick, - modifier = Modifier.align(CenterEnd), ) } }