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

Position alignment #539

Merged
merged 11 commits into from
Jul 24, 2023
Merged

Position alignment #539

merged 11 commits into from
Jul 24, 2023

Conversation

zsoltk
Copy link
Contributor

@zsoltk zsoltk commented Jul 22, 2023

Description

Allows Position to take an Alignment that can be animated: #465

  • Offset and Alignment can be used independently or together too – the latter allows to define positions that are relative to an anchor, e.g. Position.Target(Alignment.Center, DpOffset(50.dp, 50.dp))
  • Alignment can be any BiasAlignment, fractional numbers work too (e.g. 0.5f = 50% between Center and End)
  • All TestDrive-based examples now animate Alignment instead of DpOffset = they're no longer dependent on the available screen space.

This PR should also unlock some better shared element transition capabilities (not in the layout sense, but on the level of visual effects experienced), we should build a small demo for it.

I expect screenshot tests to break as e.g. CenterStart/CenterEnd will not be exactly where the previous ad-hoc offsets were set.

Check list

  • I have updated CHANGELOG.md if required.
  • I have updated documentation if required.

@zsoltk zsoltk added enhancement New feature or request appyx-interactions labels Jul 22, 2023
@zsoltk zsoltk added this to the 2.0 milestone Jul 22, 2023
@zsoltk zsoltk merged commit ad1e05c into bumble-tech:2.x Jul 24, 2023
5 checks passed
@zsoltk zsoltk mentioned this pull request Sep 8, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appyx-interactions enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants