当前位置: 首页>>代码示例>>Java>>正文


Java ObjectAnimator.setRepeatCount方法代码示例

本文整理汇总了Java中com.nineoldandroids.animation.ObjectAnimator.setRepeatCount方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectAnimator.setRepeatCount方法的具体用法?Java ObjectAnimator.setRepeatCount怎么用?Java ObjectAnimator.setRepeatCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.nineoldandroids.animation.ObjectAnimator的用法示例。


在下文中一共展示了ObjectAnimator.setRepeatCount方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    ValueAnimator scaleAnim=ValueAnimator.ofFloat(0.5f,1,0.5f);
    scaleAnim.setDuration(1000);
    scaleAnim.setRepeatCount(-1);
    scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            scaleFloat = (float) animation.getAnimatedValue();
            postInvalidate();
        }
    });
    scaleAnim.start();

    ObjectAnimator rotateAnim=ObjectAnimator.ofFloat(getTarget(),"rotation",0,180,360);
    rotateAnim.setDuration(1000);
    rotateAnim.setRepeatCount(-1);
    rotateAnim.start();

    animators.add(scaleAnim);
    animators.add(rotateAnim);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:25,代码来源:BallRotateIndicator.java

示例2: startRotation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
public static void startRotation(View view, float toRotation, long duration, long startDelay, int times) {
    ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "rotation", ViewHelper.getRotation(view), toRotation).setDuration(duration);
    objectAnimator.setStartDelay(startDelay);
    objectAnimator.setRepeatCount(times);
    objectAnimator.setInterpolator(new LinearInterpolator());
    objectAnimator.start();
}
 
开发者ID:arieshao,项目名称:Integration,代码行数:8,代码来源:AnimUtil.java

示例3: createAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    PropertyValuesHolder rotation5=PropertyValuesHolder.ofFloat("rotationX",0,180,180,0,0);
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationY",0,0,180,180,0);
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6,rotation5);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(2500);
    animator.start();
    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:14,代码来源:SquareSpinIndicator.java

示例4: createAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    PropertyValuesHolder rotation5=PropertyValuesHolder.ofFloat("rotationX",0,180,180,0,0);
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationY",0,0,180,180,0);
    
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6,rotation5);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(2500);
    animator.start();

    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:16,代码来源:TriangleSkewSpinIndicator.java

示例5: createAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    ObjectAnimator rotateAnim=ObjectAnimator.ofFloat(getTarget(),"rotation",0,180,360);
    rotateAnim.setDuration(600);
    rotateAnim.setRepeatCount(-1);
    rotateAnim.start();
    animators.add(rotateAnim);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:11,代码来源:SemiCircleSpinIndicator.java

示例6: createAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationX",0,360);
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(1500);
    animator.start();
    List<Animator> animators=new ArrayList<>();
    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:13,代码来源:BallPulseRiseIndicator.java


注:本文中的com.nineoldandroids.animation.ObjectAnimator.setRepeatCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。