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


Java ValueAnimator.setStartDelay方法代码示例

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


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

示例1: startAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
/**
 * Starts the underlying Animator for a set of properties. We use a single animator that
 * simply runs from 0 to 1, and then use that fractional value to set each property
 * value accordingly.
 */
private void startAnimation() {
    ValueAnimator animator = ValueAnimator.ofFloat(1.0f);
    ArrayList<NameValuesHolder> nameValueList =
            (ArrayList<NameValuesHolder>) mPendingAnimations.clone();
    mPendingAnimations.clear();
    int propertyMask = 0;
    int propertyCount = nameValueList.size();
    for (int i = 0; i < propertyCount; ++i) {
        NameValuesHolder nameValuesHolder = nameValueList.get(i);
        propertyMask |= nameValuesHolder.mNameConstant;
    }
    mAnimatorMap.put(animator, new PropertyBundle(propertyMask, nameValueList));
    animator.addUpdateListener(mAnimatorEventListener);
    animator.addListener(mAnimatorEventListener);
    if (mStartDelaySet) {
        animator.setStartDelay(mStartDelay);
    }
    if (mDurationSet) {
        animator.setDuration(mDuration);
    }
    if (mInterpolatorSet) {
        animator.setInterpolator(mInterpolator);
    }
    animator.start();
}
 
开发者ID:junchenChow,项目名称:exciting-app,代码行数:31,代码来源:ViewPropertyAnimatorHC.java

示例2: startAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
private void startAnimation() {
    ValueAnimator animator = ValueAnimator.ofFloat(new float[]{1.0f});
    ArrayList<NameValuesHolder> nameValueList = (ArrayList) this.mPendingAnimations.clone();
    this.mPendingAnimations.clear();
    int propertyMask = 0;
    for (int i = 0; i < nameValueList.size(); i++) {
        propertyMask |= ((NameValuesHolder) nameValueList.get(i)).mNameConstant;
    }
    this.mAnimatorMap.put(animator, new PropertyBundle(propertyMask, nameValueList));
    animator.addUpdateListener(this.mAnimatorEventListener);
    animator.addListener(this.mAnimatorEventListener);
    if (this.mStartDelaySet) {
        animator.setStartDelay(this.mStartDelay);
    }
    if (this.mDurationSet) {
        animator.setDuration(this.mDuration);
    }
    if (this.mInterpolatorSet) {
        animator.setInterpolator(this.mInterpolator);
    }
    animator.start();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:23,代码来源:ViewPropertyAnimatorHC.java

示例3: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    long[] delays=new long[]{500,250,0,250,500};
    for (int i = 0; i < 5; i++) {
        final int index=i;
        ValueAnimator scaleAnim=ValueAnimator.ofFloat(1,0.3f,1);
        scaleAnim.setDuration(900);
        scaleAnim.setRepeatCount(-1);
        scaleAnim.setStartDelay(delays[i]);
        scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scaleYFloats[index] = (float) animation.getAnimatedValue();
                postInvalidate();
            }
        });
        scaleAnim.start();
        animators.add(scaleAnim);
    }
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:23,代码来源:LineScalePulseOutIndicator.java

示例4: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    long[] durations=new long[]{1260, 430, 1010, 730};
    long[] delays=new long[]{770, 290, 280, 740};
    for (int i = 0; i < 4; i++) {
        final int index=i;
        ValueAnimator scaleAnim=ValueAnimator.ofFloat(1,0.4f,1);
        scaleAnim.setDuration(durations[i]);
        scaleAnim.setRepeatCount(-1);
        scaleAnim.setStartDelay(delays[i]);
        scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scaleFloats[index] = (float) animation.getAnimatedValue();
                postInvalidate();
            }
        });
        scaleAnim.start();
        animators.add(scaleAnim);
    }
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:24,代码来源:LineScalePartyIndicator.java

示例5: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    float circleSpacing=4;
    float radius=(getWidth()-circleSpacing*2)/6;
    int[] delays=new int[]{70,140,210};
    for (int i = 0; i < 3; i++) {
        final int index=i;
        ValueAnimator scaleAnim=ValueAnimator.ofFloat(getHeight()/2,getHeight()/2-radius*2,getHeight()/2);
        scaleAnim.setDuration(600);
        scaleAnim.setRepeatCount(-1);
        scaleAnim.setStartDelay(delays[i]);
        scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                translateYFloats[index] = (float) animation.getAnimatedValue();
                postInvalidate();
            }
        });
        scaleAnim.start();
        animators.add(scaleAnim);
    }
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:25,代码来源:BallPulseSyncIndicator.java

示例6: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    long[] delays=new long[]{400,200,0,200,400};
    for (int i = 0; i < 5; i++) {
        final int index=i;
        ValueAnimator scaleAnim=ValueAnimator.ofFloat(1,0.4f,1);
        scaleAnim.setDuration(1000);
        scaleAnim.setRepeatCount(-1);
        scaleAnim.setStartDelay(delays[i]);
        scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scaleYFloats[index] = (float) animation.getAnimatedValue();
                postInvalidate();
            }
        });
        scaleAnim.start();
        animators.add(scaleAnim);
    }
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:23,代码来源:LineScalePulseOutRapidIndicator.java

示例7: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();

    int[] durations={960, 930, 1190, 1130, 1340, 940, 1200, 820, 1190};
    int[] delays= {360, 400, 680, 410, 710, -150, -120, 10, 320};

    for (int i = 0; i < 9; i++) {
        final int index=i;
        ValueAnimator alphaAnim=ValueAnimator.ofInt(255, 168,255);
        alphaAnim.setDuration(durations[i]);
        alphaAnim.setRepeatCount(-1);
        alphaAnim.setStartDelay(delays[i]);
        alphaAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                alphas[index] = (int) animation.getAnimatedValue();
                postInvalidate();
            }
        });
        alphaAnim.start();
        animators.add(alphaAnim);
    }
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:26,代码来源:BallGridBeatIndicator.java

示例8: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    int[] delays=new int[]{120,240,360};
    for (int i = 0; i < 3; i++) {
        final int index=i;
        
        ValueAnimator scaleAnim=ValueAnimator.ofFloat(1,0.3f,1);
        
        scaleAnim.setDuration(750);
        scaleAnim.setRepeatCount(-1);
        scaleAnim.setStartDelay(delays[i]);
        
        scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scaleFloats[index] = (float) animation.getAnimatedValue();
                postInvalidate();

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

示例9: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    long[] delays=new long[]{100,200,300,400,500};
    for (int i = 0; i < 5; i++) {
        final int index=i;
        ValueAnimator scaleAnim=ValueAnimator.ofFloat(1, 0.4f, 1);
        scaleAnim.setDuration(1000);
        scaleAnim.setRepeatCount(-1);
        scaleAnim.setStartDelay(delays[i]);
        scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scaleYFloats[index] = (float) animation.getAnimatedValue();
                postInvalidate();
            }
        });
        scaleAnim.start();
        animators.add(scaleAnim);
    }
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:23,代码来源:LineScaleIndicator.java

示例10: createAnimation

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators = new ArrayList<>();
    for (int i = 0; i < CIRCLE_NUM; i++) {
        final int index = i;

        ValueAnimator scaleAnim = ValueAnimator.ofFloat(1, 0.3f, 1);

        scaleAnim.setDuration(BASE_DELAY_MILLIS * CIRCLE_NUM * 3 / 2);
        scaleAnim.setRepeatCount(-1);
        scaleAnim.setStartDelay(delays[i]);

        scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scaleFloats[index] = (float) animation.getAnimatedValue();
                postInvalidate();
            }
        });
        scaleAnim.start();
        animators.add(scaleAnim);
    }
    return animators;
}
 
开发者ID:Piasy,项目名称:AndroidPlayground,代码行数:25,代码来源:BallPulseIndicator.java

示例11: parseAnimatorFromTypeArray

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
/**
 * @param anim The animator, must not be null
 * @param arrayAnimator Incoming typed array for Animator's attributes.
 * @param arrayObjectAnimator Incoming typed array for Object Animator's
 *            attributes.
 */
private static void parseAnimatorFromTypeArray(ValueAnimator anim,
                                               TypedArray arrayAnimator, TypedArray arrayObjectAnimator) {
    long duration = arrayAnimator.getInt(R.styleable.Animator_android_duration, 300);

    long startDelay = arrayAnimator.getInt(R.styleable.Animator_android_startOffset, 0);

    int valueType = arrayAnimator.getInt(R.styleable.Animator_vc_valueType, 0);

    TypeEvaluator evaluator = null;

    // Must be a path animator by the time I reach here
    if (valueType == VALUE_TYPE_PATH) {
        evaluator = setupAnimatorForPath(anim, arrayAnimator);
    } else {
        throw new IllegalArgumentException("target is not a pathType target");
    }

    anim.setDuration(duration);
    anim.setStartDelay(startDelay);

    if (arrayAnimator.hasValue(R.styleable.Animator_android_repeatCount)) {
        anim.setRepeatCount(
                arrayAnimator.getInt(R.styleable.Animator_android_repeatCount, 0));
    }
    if (arrayAnimator.hasValue(R.styleable.Animator_android_repeatMode)) {
        anim.setRepeatMode(
                arrayAnimator.getInt(R.styleable.Animator_android_repeatMode,
                        ValueAnimator.RESTART));
    }
    if (evaluator != null) {
        anim.setEvaluator(evaluator);
    }

    if (arrayObjectAnimator != null) {
        setupObjectAnimator(anim, arrayObjectAnimator);
    }
}
 
开发者ID:canyinghao,项目名称:CanDialog,代码行数:44,代码来源:PathAnimatorInflater.java

示例12: a

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
private void a()
{
    ValueAnimator valueanimator = ValueAnimator.ofFloat(new float[] {
        1.0F
    });
    ArrayList arraylist = (ArrayList)a.clone();
    a.clear();
    int i1 = arraylist.size();
    int j1 = 0;
    int k1 = 0;
    do
    {
        if (j1 >= i1)
        {
            y.put(valueanimator, new m(k1, arraylist));
            valueanimator.addUpdateListener(k);
            valueanimator.addListener(k);
            if (g)
            {
                valueanimator.setStartDelay(f);
            }
            if (e)
            {
                valueanimator.setDuration(d);
            }
            if (i)
            {
                valueanimator.setInterpolator(h);
            }
            valueanimator.start();
            return;
        }
        k1 |= ((l)arraylist.get(j1)).a;
        j1++;
    } while (true);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:37,代码来源:i.java

示例13: a

import com.nineoldandroids.animation.ValueAnimator; //导入方法依赖的package包/类
private void a()
{
    ValueAnimator valueanimator = ValueAnimator.ofFloat(new float[] {
        1.0F
    });
    ArrayList arraylist = (ArrayList)a.clone();
    a.clear();
    int i1 = arraylist.size();
    int j1 = 0;
    int k1 = 0;
    do
    {
        if (j1 >= i1)
        {
            x.put(valueanimator, new f(k1, arraylist));
            valueanimator.addUpdateListener(j);
            valueanimator.addListener(j);
            if (f)
            {
                valueanimator.setStartDelay(e);
            }
            if (d)
            {
                valueanimator.setDuration(c);
            }
            if (h)
            {
                valueanimator.setInterpolator(g);
            }
            valueanimator.start();
            return;
        }
        k1 |= ((e)arraylist.get(j1)).a;
        j1++;
    } while (true);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:37,代码来源:b.java


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