Skip to content

Commit f2a014a

Browse files
committed
PR Review comments.
1 parent 96bc06a commit f2a014a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/animations/AnimationSnippets.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package com.example.compose.snippets.animations
2020

2121
import androidx.compose.animation.Animatable
22+
import androidx.compose.animation.core.Animatable
2223
import androidx.compose.animation.AnimatedContent
2324
import androidx.compose.animation.AnimatedVisibility
2425
import androidx.compose.animation.Crossfade
@@ -739,7 +740,6 @@ private fun AnimationSpecKeyframeWithSpline() {
739740
// [END android_compose_animation_spec_keyframes_with_spline]
740741
}
741742

742-
@Suppress("PrimitiveInCollection")
743743
@OptIn(ExperimentalAnimationSpecApi::class)
744744
@Preview
745745
@Composable
@@ -792,8 +792,7 @@ private fun OffsetKeyframeWithSplineDemo() {
792792
durationMillis = 4400
793793

794794
// Increasingly approach the halfway point moving from side to side
795-
repeat(4) {
796-
val i = it + 1
795+
for (i in 0..4) {
797796
val sign = if (i % 2 == 0) 1 else -1
798797
Offset(
799798
x = maxXOff * (i.toFloat() / 5f) * sign,
@@ -805,8 +804,7 @@ private fun OffsetKeyframeWithSplineDemo() {
805804
Offset(0f, maxYOff) atFraction 0.5f
806805

807806
// Return with mirrored movement
808-
repeat(4) {
809-
val i = it + 1
807+
for(i in 0..4) {
810808
val sign = if (i % 2 == 0) 1 else -1
811809
Offset(
812810
x = maxXOff * (1f - i.toFloat() / 5f) * sign,

0 commit comments

Comments
 (0)