@Test
public void validateSetOfObjectAnimatorAlphaMotionTiming() {
MotionSpec spec =
MotionSpec.createFromResource(
activityTestRule.getActivity(), R.animator.valid_set_of_object_animator_motion_spec);
MotionTiming alpha = spec.getTiming("alpha");
assertEquals(3, alpha.getDelay());
assertEquals(5, alpha.getDuration());
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
assertThat(alpha.getInterpolator(), instanceOf(PathInterpolator.class));
} else {
assertThat(alpha.getInterpolator(), instanceOf(FastOutLinearInInterpolator.class));
}
assertEquals(7, alpha.getRepeatCount());
assertEquals(ValueAnimator.RESTART, alpha.getRepeatMode());
}
MotionSpecTest.java 文件源码
java
阅读 42
收藏 0
点赞 0
评论 0
项目:material-components-android
作者:
评论列表
文章目录