From 3af7757f3032dbb4192362c9404cbc6e50780d7c Mon Sep 17 00:00:00 2001 From: Thomas Andres Gomez Date: Thu, 21 Dec 2023 15:15:00 +0100 Subject: [PATCH] Add missing animation on the SummaryProficiency cell --- .../summary/composable/common/SummaryCell.kt | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/pixelized/rplexicon/ui/screens/summary/composable/common/SummaryCell.kt b/app/src/main/java/com/pixelized/rplexicon/ui/screens/summary/composable/common/SummaryCell.kt index c17689b..631a68f 100644 --- a/app/src/main/java/com/pixelized/rplexicon/ui/screens/summary/composable/common/SummaryCell.kt +++ b/app/src/main/java/com/pixelized/rplexicon/ui/screens/summary/composable/common/SummaryCell.kt @@ -231,15 +231,21 @@ private fun SummaryProficiency( size = MaterialTheme.lexicon.dimens.summary.mastery, multiplier = value.multiplier, ) - Text( + AnimatedContent( modifier = Modifier.weight(weight = 1f), - text = value.label, - style = style, - color = color, - overflow = TextOverflow.Ellipsis, - textAlign = TextAlign.Center, - maxLines = 1 - ) + targetState = value.label, + label = "SummaryMaxLabelAnimation", + transitionSpec = animationSpec(), + ) { + Text( + text = it, + style = style, + color = color, + overflow = TextOverflow.Ellipsis, + textAlign = TextAlign.Center, + maxLines = 1 + ) + } } }