android / codelab-android-compose

Apache License 2.0
1.42k stars 649 forks source link

[AnimationCodelab] Gesture not working properly #145

Closed puchm closed 3 years ago

puchm commented 3 years ago

Hi,

during the last step of the Animation Codelab I had the issue that the gesture for removing a task doesn't work properly. What happens is that the task stops moving every time my finger moves up or down a bit because the Column scrolls and apparently the event doesn't reach the TaskRow.

What I would expect is that the Column doesn't scroll while I am swiping away the task, much like the swiping gestures in Gmail. Also as long as the gesture started inside the TaskRow it shouldn't matter if the touch leaves the area of the task row.

Here is a video of the issue: https://user-images.githubusercontent.com/21011840/112719606-f72f3880-8ef9-11eb-8b4a-88d3e791c6b8.mp4

Also I don't know if this is the right place to give feedback on the Codelab but the last section about gestures felt incomplete to me. It felt like I was just running through a list of todos and the Codelab gave some brief information on why I was doing what I was doing but I didn't really understand it.

I think there are two options for how to improve:

  1. Show the user the issue with every step. Encourage him to check out the app on his phone to see what is not working and what needs to be improved. Then explain how to solve that instead of just doing so at the end to see the finished product.
  2. A separate compose Codelab about gestures. I feel like gestures can be a really complex topic but they are also an essential component of many apps so they might deserve their own Codelab.

Other than that I really enjoyed learning about Jetpack Compose and the Codelabs are great! Thanks!

-Moritz

RandallXia commented 3 years ago

In my condition, step 5 "Animating content size change" doesn't work too. The click event doesn't respond properly.

MadFlasheroo7 commented 3 years ago

annotating TopicRow function with @ExperimentalMaterialApi while using Android Studio Beta and adding onClick = onClick to Surface fixed for me ,but i still can't figure out for *swipeToDismiss*

RandallXia commented 3 years ago

annotating TopicRow function with @ExperimentalMaterialApi while using Android Studio Beta and adding onClick = onClick to Surface fixed for me ,but i still can't figure out for *swipeToDismiss*

I found the same solution in Pull Request and it worked. But the ripple didn't respond smoothly. Still no clue about the *swipeToDismiss*