當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。