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

Disabling animation clipping #1825

Closed
Pavel87 opened this issue Jun 16, 2021 · 6 comments · Fixed by #1993
Closed

Disabling animation clipping #1825

Pavel87 opened this issue Jun 16, 2021 · 6 comments · Fixed by #1993

Comments

@Pavel87
Copy link

Pavel87 commented Jun 16, 2021

Hi team,

we have an animation which seems to be clipping at the top for some images. I wonder how we can disable clipping and draw out of the rectangle.

My IOS peer is using animationView.clipsToBounds = false which does work pretty well but I am struggling with the clipping in android.

I have tried android:scaleType="centerInside" and android:scaleType="centerCrop" on lottieAnimationView and for parent ConstraintLayout:
android:clipChildren="false"
android:clipToPadding="false"

Is there way how I can avoid the clipping and render out of bounds?

Screenshots
Screen Shot 2021-06-16 at 1 34 44 PM
Screen Shot 2021-06-16 at 1 34 20 PM

@Pavel87 Pavel87 changed the title Animation clipping Disabling animation clipping Jun 16, 2021
@Pavel87
Copy link
Author

Pavel87 commented Jun 28, 2021

@gpeal could you please provide any help with this ticket?

@CherryLover
Copy link

I have same problem. Does any help to fix?

@Pavel87
Copy link
Author

Pavel87 commented Jan 4, 2022

Still looking for any kind of advice on how to make the animation draw out of bounds. It seems it is getting clipped by bounds defined in JSON and using any of the XML clip parameters does not work.

@gpeal
Copy link
Collaborator

gpeal commented Jan 4, 2022

@Pavel87 It wasn't really feasible until #1952 landed. With this change, when using hardware acceleration, it might be more feasible.

@Pavel87
Copy link
Author

Pavel87 commented Jan 4, 2022

I see, it would be greatly appreciated if you could somehow put it on your radar.

@gpeal
Copy link
Collaborator

gpeal commented Jan 4, 2022

Will do!

gpeal added a commit that referenced this issue Jan 16, 2022
…the original composition bounds (#1993)

Since the beginning of time, Lottie has only rendered the bounds of the original composition. This PR adds a new API to enable rendering the full animation, even if it extends beyond the original composition bounds.

This API defaults to off to retain backwards compatibility.

Fixes #1825
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants