Open emartynov opened 7 years ago
It looks like ObjectAnimator is not executed immediately.
ObjectAnimator
Code:
final View topChild = getTopChild(); animator = ObjectAnimator.ofFloat(topChild, "x", signum(topChild.getX()) * (getWidth() - 10)); animator.start();
It is expected that top child x will be close to the width of the parent. But it actually only changes to several points from the position where it was before animation start.
It also doesn't invoke end method of animation listener.
Robolectric 3.2.1 Android N(24) and N_MR1(25)
Guys, any idea why it happens? This is only one issue that blocks us to use newest API in tests
@emartynov See my workaround with mocking https://stackoverflow.com/a/65076247/4288054
Description
It looks like
ObjectAnimator
is not executed immediately.Steps to Reproduce
Code:
It is expected that top child x will be close to the width of the parent. But it actually only changes to several points from the position where it was before animation start.
It also doesn't invoke end method of animation listener.
Robolectric & Android Version
Robolectric 3.2.1 Android N(24) and N_MR1(25)