@Test
public void preparePartialTransition_setsPartialInterpolator() {
//given
final StaggeredAnimationGroup spiedGroup = prepareSpiedGroup();
final TimeInterpolator testInterpolator = new LinearOutSlowInInterpolator();
final Transition spiedTransition = spy(new AutoTransition());
final StaggeredAnimationGroup.PartialTransitionFactory factory =
new StaggeredAnimationGroup.PartialTransitionFactory() {
@Override
public Transition createPartialTransition(boolean show, int viewId, int indexInTransition) {
return spiedTransition;
}
};
spiedGroup.setPartialTransitionFactory(factory);
spiedGroup.setPartialInterpolator(testInterpolator);
//when
spiedGroup.preparePartialTransition(true, 0, 0);
//then
verify(spiedTransition, times(1)).setInterpolator(testInterpolator);
}
StaggeredAnimationGroupTest.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:StaggeredAnimationGroup
作者:
评论列表
文章目录