Skip to content

Commit f64e931

Browse files
committed
code formatting.
1 parent 5a70e16 commit f64e931

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

app/src/main/java/com/commandiron/animatablecompose/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class MainActivity : ComponentActivity() {
2121
color = MaterialTheme.colorScheme.background
2222
) {}
2323
Box(Modifier.fillMaxSize(), Alignment.Center) {
24-
Show1AnimatableText()
24+
Show6CardDealer()
2525
}
2626
}
2727
}

app/src/main/java/com/commandiron/animatablecompose/Show6CardDealer.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ fun Show6CardDealer() {
4040
val cardStates = mutableListOf<AnimatableState>()
4141
val textStates = mutableListOf<AnimatableState>()
4242

43-
deck.indices.forEach {
43+
deck.indices.forEach { index ->
4444
cardStates.add(
4545
animatableCardState.copy(
46-
index = it,
47-
toTargetOffsetAnimationSpec = tween(400, (it * 400)),
48-
targetOffset = DpOffset(if(it % 2 == 0) (-100).dp else 100.dp, (-150).dp)
46+
index = index,
47+
toTargetOffsetAnimationSpec = tween(400, (index * 400)),
48+
targetOffset = DpOffset(if(index % 2 == 0) (-100).dp else 100.dp, (-150).dp)
4949
)
5050
)
5151
textStates.add(
5252
animatableTextState.copy(
53-
index = it,
54-
toTargetFontSizeAnimationSpec = tween(400, (it * 400))
53+
index = index,
54+
toTargetFontSizeAnimationSpec = tween(400, (index * 400))
5555
)
5656
)
5757

@@ -68,18 +68,18 @@ fun Show6CardDealer() {
6868
},
6969
contentAlignment = Alignment.Center
7070
) {
71-
deck.indices.forEach {
71+
deck.indices.forEach { index ->
7272
AnimatableCard(
7373
onClick = {},
7474
state = sharedAnimatableState,
75-
stateIndex = it,
75+
stateIndex = index,
7676
fixedShape = RoundedCornerShape(16.dp)
7777
) {
7878
Box(Modifier.fillMaxSize(), Alignment.Center) {
7979
AnimatableText(
80-
text = deck[it],
80+
text = deck[index],
8181
state = sharedAnimatableState,
82-
stateIndex = it
82+
stateIndex = index
8383
)
8484
}
8585
}

0 commit comments

Comments
 (0)