Skip to content

Commit 363a1c8

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 8f4d9be + 261af0d commit 363a1c8

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ What you can create from Material 3 components right now;
1515

1616
<img src="https://user-images.githubusercontent.com/50905347/197984728-7bfe5536-b78e-41e1-91cb-5bc167e51850.gif" width="250" height="530">&nbsp;&nbsp;<img src="https://user-images.githubusercontent.com/50905347/198032696-f78f2b66-964c-494d-9614-14107ecde244.gif" width="250" height="530">
1717

18-
### Expandable Phone Number
18+
### Expandable Phone Number Animation
1919

2020
<details closed>
2121
<summary>States</summary>
@@ -27,7 +27,7 @@ What you can create from Material 3 components right now;
2727
val animatableCardState = rememberAnimatableCardState(
2828
initialSize = DpSize(80.dp, 80.dp),
2929
targetSize = DpSize(Dp.Infinity, 120.dp),
30-
toTargetSizeAnimationSpec = tween(500, 500), // add delay(500) for target
30+
toTargetSizeAnimationSpec = tween(500, 500), // specify delay(500) for target
3131
initialShape = RoundedCornerShape(32.dp),
3232
targetShape = RoundedCornerShape(0.dp),
3333
toTargetShapeAnimationSpec = tween(500, 500),
@@ -116,7 +116,7 @@ AnimatableCard(
116116
```
117117
</details>
118118

119-
### Card Dealer (just a few code)
119+
### Card Dealer Animation (just a few code)
120120

121121
<details closed>
122122
<summary>States</summary>
@@ -340,7 +340,7 @@ Box(
340340

341341
### AnimatableCardWithText
342342

343-
<img src="https://user-images.githubusercontent.com/50905347/198940886-d2107020-4043-424a-85b2-dfeb7fccf41e.gif" width="250" height="530">
343+
<img src="https://user-images.githubusercontent.com/50905347/199411703-02d14430-853a-430a-a7a3-2d920eaa5fe3.gif" width="250" height="530">
344344

345345
<details closed>
346346
<summary>States</summary>
@@ -352,22 +352,20 @@ Box(
352352
val animatableCardState = rememberAnimatableCardState(
353353
initialSize = DpSize(width = 50.dp, height = 25.dp),
354354
targetSize = DpSize(width = 300.dp, height = 150.dp),
355-
toTargetSizeAnimationSpec = spring(Spring.DampingRatioHighBouncy, Spring.StiffnessVeryLow),
356-
initialShape = RoundedCornerShape(4.dp),
357-
targetShape = RoundedCornerShape(16.dp),
358-
toTargetShapeAnimationSpec = spring(Spring.DampingRatioHighBouncy, Spring.StiffnessVeryLow),
355+
initialShape = CircleShape,
356+
targetShape = RoundedCornerShape(16.dp)
359357
)
360358
val animatableTextState = rememberAnimatableTextState(
361359
initialFontSize = 4.sp,
362-
targetFontSize = 36.sp,
363-
toTargetFontSizeAnimationSpec = spring(Spring.DampingRatioHighBouncy, Spring.StiffnessVeryLow)
360+
targetFontSize = 36.sp
364361
)
365362
// Merge the states you created into sharedState and pass it to AnimatableCard and AnimatableText
366363
val sharedAnimatableState = rememberSharedAnimatableState(
367-
listOf(
364+
animatableStates = listOf(
368365
animatableCardState,
369366
animatableTextState
370-
)
367+
),
368+
toTargetAnimationSpec = infiniteRepeatable(tween(1000), RepeatMode.Reverse) //specify shared animation spec.
371369
)
372370
```
373371
</details>
@@ -422,5 +420,5 @@ dependencies {
422420
```
423421

424422
## Todo ✔️
425-
* SharedAnimationSpec
423+
* SharedAnimationSpec ✔️
426424
* Animation State callback from animate() ❌

0 commit comments

Comments
 (0)