-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Hero image transition #196
base: main
Are you sure you want to change the base?
Conversation
app/src/main/java/com/google/samples/apps/sunflower/utilities/MoveViews.kt
Show resolved
Hide resolved
app/src/main/java/com/google/samples/apps/sunflower/adapters/PlantAdapter.kt
Outdated
Show resolved
Hide resolved
Hi @andhie ! This is really cool! Thanks for working on it. I do have a few comments: First, it looks like you've changed (slightly) click handling when adding the shared element transition. I wonder if you could revert that, so this PR is exclusively about the shared element transition. If you slow the animation down (Developer options -> Transition animation scale + Animator duration scale, set both to 5x) you can see the transition feels a bit off. Specifically, while the image from the plant list moves to the header position smoothly, the fragment pops in with all the details first, and so the image looks like it slides over the fragment. This is in contrast with the example animations from the Material Design website: https://material.io/design/components/lists.html#behavior -- The hero image should move and expand, either revealing the text as it expands or having the text fade in afterwards, so it looks as though the plant details fragment is unfolding from the plant item. Does that make sense? |
i have revert the click listener code. |
Hi @andhie :) That makes sense. I think the animation that's on the right side (captioned with "The list item and focal element transition...") is close to what I was thinking about, and feels closer to what you had, since the hero image was animating up. Does that help? |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
CLAs look good, thanks! |
@nic0lette i've tweak a little transition animation. Enter Transition: the collapsingtoolbar title appears after everything completed do you have any suggestions to improving this? |
Sorry for the slow reply :) I took a look at this and I think the enter transition needs to fade the moving header image as it settles into place so that the collapsing toolbar (with the text) can be seen. (At least, what I think is happening is that the moving image is covering the toolbar and so, until it's removed at the end, the title isn't visible). Unfortunately I'm still learning these things and so I wasn't able to quickly verify this, but you may be able to :) |
Good news: i have done a test, it's as you mentioned, the moving image overlay is covering/hovering over the actual image+title and only appear when the overlay disappears. |
Changes in #315 makes the title appearing out of order is now invalid. |
Fixes #66