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

Support zIndex Config for Transition #446

Merged
merged 11 commits into from
Jun 28, 2024

Conversation

qdsfdhvh
Copy link
Contributor

@qdsfdhvh qdsfdhvh commented Jun 16, 2024

To implement an animation such as the following, we need to use the zindex value.

Copy link
Collaborator

@DevSrSouza DevSrSouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this PR is doing more then just adding zIndex support, can you explaim in depth the changes and why they are needed and the use cases for it?

@qdsfdhvh
Copy link
Contributor Author

I want to support animate like this, with zIndex:

untitled-ezgif.com-video-to-mp4-converter.1.mp4

without zIndex:

untitled2-ezgif.com-video-to-mp4-converter.mp4

AnimatedContent By default the targetState content will be at the top, so we need to configure the ZIndex to adjust the hierarchy;

contentAlignment: Alignment and contentKey: (Screen) -> Any are just the parameters of the AnmiationContent passed out, maybe it will be needed later;

For contentKey: (Screen) -> Any = { it.key } is just me that thinks { it.key } might be a bit more appropriate than the default {it},also wo can back to the default value.

@qdsfdhvh qdsfdhvh requested a review from DevSrSouza June 25, 2024 02:25
@qdsfdhvh qdsfdhvh requested a review from DevSrSouza June 25, 2024 05:14
@DevSrSouza
Copy link
Collaborator

Can you explain what is this change are different from #445?

@qdsfdhvh
Copy link
Contributor Author

qdsfdhvh commented Jun 26, 2024

The difference is still the same as enter/exit animation, #445 works for the default animation which needs to configure zIndex, but it's not convenient if it's a screen specific animation which needs to configure zIndex.

@DevSrSouza DevSrSouza merged commit e14783e into adrielcafe:main Jun 28, 2024
1 check passed
@qdsfdhvh qdsfdhvh deleted the seiko/transition_zindex branch July 3, 2024 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants