Thread
#compose
    m

    Mohammad Sianaki

    11 months ago
    Hi, How Can I animate a
    Text
    between two
    TextStyle
    ?
    m

    Marko Novakovic

    11 months ago
    recently I animated
    fontSize
    and color together:
    val transition = updateTransition(targetState = isSelected, label = "")
        val color by transition.animateColor { selected ->
            if (selected) Color.Black else Color.LightGray
        }
        val fontSize by transition.animateInt { selected ->
            if (selected) 24 else 16
        }
    Text(
                text = label,
                fontSize = fontSize.sp,
                color = color,
            )
    something like this
    maybe that can help you
    OR you can maybe use
    AnimatedContent
    with and define some custom animation
    m

    Mohammad Sianaki

    11 months ago
    thanks, any idea how to animate beween two material typography?
    m

    Marko Novakovic

    11 months ago
    AnimatedContent
    is the only thing that comes to mind right now
    or you can create your own custom animation and provide
    TwoWayConverter
    am not aware of that exiting out of the box