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