j

    Jakub Ledwon

    1 year ago
    I encountered pretty weird behaviour while using
    infiniteRepetable
    : I'm using
    tween
    as
    animation
    and while having
    durationMillis < 1000*48
    (48s) everything works perfectly fine, but while trying to animate with
    durationMillis
    greater than 48s (which seems super weird), it justs snaps from
    initialValue
    to
    targetValue
    . Do you have any idea why is it not working correctly? Am i doing something wrong? Here is super simple
    Composable
    that allows to reproduce my problem:
    @Composable
    fun Test() {
        val infTrans = rememberInfiniteTransition()
    
        val value = infTrans.animateFloat(
            initialValue = 0f, targetValue = 1f, animationSpec = infiniteRepeatable(
                animation = tween(1000 * 60, easing = LinearEasing),
            )
        )
    
        Text(value.value.toString())
    }
    Doris Liu

    Doris Liu

    1 year ago
    This is a known issue for
    infiniteRepaetable
    that was fixed in beta02. 🙂
    Consider updating to beta02. 😉
    j

    Jakub Ledwon

    1 year ago
    I have that on my tasks list, I guess its priority just improved 😄
    Rafs

    Rafs

    1 year ago
    Oh wow we have beta02 already? where have i been
    Doris Liu

    Doris Liu

    1 year ago
    Haha beta03 is coming pretty soon if all goes well. 🙂