Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 445301931
- Loading branch information
1 parent
ea68d95
commit 963d299
Showing
2 changed files
with
64 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters