Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Animation with Jetpack Compose #100

Open
rosie-i opened this issue Jul 14, 2024 · 0 comments
Open

Simple Animation with Jetpack Compose #100

rosie-i opened this issue Jul 14, 2024 · 0 comments

Comments

@rosie-i
Copy link

rosie-i commented Jul 14, 2024

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-woof-animation#0

In which task and step of the codelab can this issue be found?
6) Add animation

Describe the problem

You are first instructed to add .animateContentSize to the modifier:

Column(
   modifier = Modifier
       .animateContentSize()
)

This adds a default animation, which the codelab describes as 'so subtle that it is difficult to discern when you run the app'

But the animation you're then instructed to add is achieving exactly the same outcome as the code above:

animationSpec = spring(
               dampingRatio = Spring.DampingRatioNoBouncy,
               stiffness = Spring.StiffnessMedium
           )

The docs state that the default parameter for animation spec is spring(), and that spring() 's default parameters are dampingRatio = Spring.DampingRatioNoBouncy and stiffness = Spring.StiffnessMedium .

It makes sense to teach us how to use animationSpec to customise animations of course, but it's confusing to imply that we're going to add code which will result in a noticeably different animation when it's just explicitly coding in the default parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant