Class

KeyframesSpec.KeyframesSpecConfig

KeyframesSpecConfig stores a mutable configuration of the key frames, including durationMillis, delayMillis, and all the key frames.

KeyframesBuilderForPosition

@Sampled
fun KeyframesBuilderForPosition() {
    // Use FastOutSlowInEasing for the interval from 0 to 50 ms, and LinearOutSlowInEasing for the
    // time between 50 and 100ms
    keyframes<DpOffset> {
        durationMillis = 200
        DpOffset(0.dp, 0.dp) at 0 using LinearEasing
        DpOffset(500.dp, 100.dp) at 100 using LinearOutSlowInEasing
        DpOffset(400.dp, 50.dp) at 150
    }
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: