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

Feature set animation before expand show #58

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

MohammadEhsanMohit
Copy link

@MohammadEhsanMohit MohammadEhsanMohit commented Jan 2, 2024

Hi,

In our case, we require the bubble view to move to a specific location before the expand view is shown. I have added some properties that users can set, and when the expand() function is called, the bubble view animates to the specified location before showing the expand view.

Set isAnimatedBeforeExpand to true: when the expand() method is called, the bubble view animates to the expandViewInitialPoint.

internal var isAnimatedBeforeExpand : Boolean = false
internal var expandViewInitialPoint : Point = Point(0,0)

Also, I have added a new nullable lambda to the animateTo() function to be called when the animation is finished.

fun animateTo( x: Float, y: Float, stiffness: Float = SpringForce.STIFFNESS_MEDIUM, onEnd: (() -> Unit)? = null )

Best regards.
/assign_reviewer @TorryDo

Ehsan Mohit added 5 commits January 2, 2024 04:35
1. This modification enables animation before expanding the view is shown.
2. Add a new lambda function to the animate method to notify when the animation is done.
This modification uses the new properties of FloatingBubble (animateBeforeExpandViewShow, locationBeforeExpand) to choose whether to animate the bubble view before showing the expanded view.
@MohammadEhsanMohit MohammadEhsanMohit marked this pull request as draft February 1, 2024 14:36
@MohammadEhsanMohit MohammadEhsanMohit marked this pull request as ready for review February 1, 2024 14:36
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

Successfully merging this pull request may close these issues.

None yet

1 participant