AnimatedImageVector missing in Jetpack Compose RC01

Viewed 609

AnimatedImageVector is no more present in Jetpack Compose 1.0.0-rc01 Also function animatedVectorResource is missing.

How to replace them?

1 Answers

As you can read in the release notes:

enter image description here

AnimatedImageVector was temporarily removed in order to change the module structure

UPDATE:
Starting from 1.1.0-alpha01, "AnimatedImageVector and the related APIs are now in the new androidx.compose.animation:animation-graphics module. More detail in this commit.

    val image = animatedVectorResource(drawableId)
    var atEnd by remember { mutableStateOf(false) }
    Image(
        painter = image.painterFor(atEnd),
        contentDescription = "Your content description",
        modifier = Modifier.size(64.dp).clickable {
            atEnd = !atEnd
        }
    )
Related