Skip to content

Commit

Permalink
Update Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Peal committed Nov 17, 2020
1 parent c3f7f93 commit 671f3eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions android-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ fun Loader() {
```kotlin
@Composable
fun Loader() {
val spec = remember { LottieAnimationSpec.RawRes(R.raw.loading) }
val animationSpec = remember { LottieAnimationSpec.RawRes(R.raw.loading) }
// You can control isPlaying/progress/repeat/etc. with this.
val animationState = rememberLottieAnimationState(autoPlay = true, repeatCount = Integer.MAX_VALUE)

LottieAnimation(
spec,
animationSpec,
animationState,
modifier = Modifier.preferredSize(100.dp)
)
Expand Down

0 comments on commit 671f3eb

Please sign in to comment.