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

Improve animation runner interaction with view #7280

Open
wants to merge 1 commit into
base: google
Choose a base branch
from

Commits on Apr 29, 2022

  1. Improve animation runner interaction with view

    In real `View` implementation, during drawing, the animation will be initialized on the first frame and cleared when it has finished (if it does not fill). Without these interactions if `draw` is actually called on the view then the animation is put into an inconsistent state. To support existing use cases `getAnimations` and `clearAnimations` methods are added to the shadow to allow test authors to inspect the animations that are applied to a view.
    
    Note that the real implementation would also call `onAnimationStart`/`onAnimationEnd` on the view too, but in kitkat and below this interacts with the drawing cache in a way that is not well supported by Robolectric so continue to avoid doing this.
    
    PiperOrigin-RevId: 444084414
    paulsowden authored and Copybara-Service committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    08f0b76 View commit details
    Browse the repository at this point in the history