MotionSpecTest.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:material-components-android 作者:
@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());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号