本文整理了Java中android.animation.ObjectAnimator.setStartDelay()
方法的一些代码示例,展示了ObjectAnimator.setStartDelay()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.setStartDelay()
方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:setStartDelay
暂无
代码示例来源:origin: hitherejoe/animate
private void resizeViewProperty(Property<View, Float> property,
float targetScale, int durationOffset) {
ObjectAnimator animator =
ObjectAnimator.ofFloat(this, property, 1f, targetScale);
animator.setInterpolator(new LinearOutSlowInInterpolator());
animator.setStartDelay(DELAY_COLOR_CHANGE + durationOffset);
animator.start();
}
代码示例来源:origin: H07000223/FlycoDialog_Master
@Override
public void setAnimation(View view) {
ObjectAnimator rotationX = ObjectAnimator.ofFloat(view, "rotationX", 10, 0f).setDuration(150);
rotationX.setStartDelay(200);
animatorSet.playTogether(
ObjectAnimator.ofFloat(view, "scaleX", 1.0f, 0.8f).setDuration(350),
ObjectAnimator.ofFloat(view, "scaleY", 1.0f, 0.8f).setDuration(350),
// ObjectAnimator.ofFloat(view, "alpha", 1.0f, 0.5f).setDuration(350),
ObjectAnimator.ofFloat(view, "rotationX", 0f, 10).setDuration(200),
rotationX,
ObjectAnimator.ofFloat(view, "translationY", 0, -0.1f * mDisplayMetrics.heightPixels).setDuration(350)
);
}
}
代码示例来源:origin: H07000223/FlycoDialog_Master
@Override
public void setAnimation(View view) {
ObjectAnimator rotationX = ObjectAnimator.ofFloat(view, "rotationX", 10, 0f).setDuration(150);
rotationX.setStartDelay(200);
animatorSet.playTogether(
ObjectAnimator.ofFloat(view, "scaleX", 0.8f, 1.0f).setDuration(350),
ObjectAnimator.ofFloat(view, "scaleY", 0.8f, 1.0f).setDuration(350),
// ObjectAnimator.ofFloat(view, "alpha", 1.0f, 0.5f).setDuration(350),
ObjectAnimator.ofFloat(view, "rotationX", 0f, 10).setDuration(200),
rotationX,
ObjectAnimator.ofFloat(view, "translationY", -0.1f * mDisplayMetrics.heightPixels, 0).setDuration(350)
);
}
}
代码示例来源:origin: frogermcs/InstaMaterial
private void animateShutter() {
vShutter.setVisibility(View.VISIBLE);
vShutter.setAlpha(0.f);
ObjectAnimator alphaInAnim = ObjectAnimator.ofFloat(vShutter, "alpha", 0f, 0.8f);
alphaInAnim.setDuration(100);
alphaInAnim.setStartDelay(100);
alphaInAnim.setInterpolator(ACCELERATE_INTERPOLATOR);
ObjectAnimator alphaOutAnim = ObjectAnimator.ofFloat(vShutter, "alpha", 0.8f, 0f);
alphaOutAnim.setDuration(200);
alphaOutAnim.setInterpolator(DECELERATE_INTERPOLATOR);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playSequentially(alphaInAnim, alphaOutAnim);
animatorSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
vShutter.setVisibility(View.GONE);
}
});
animatorSet.start();
}
代码示例来源:origin: hitherejoe/animate
private void animateForegroundColor(@ColorInt final int targetColor) {
ObjectAnimator animator = ObjectAnimator.ofInt(this, FOREGROUND_COLOR,
Color.TRANSPARENT, targetColor);
animator.setEvaluator(new ArgbEvaluator());
animator.setStartDelay(DELAY_COLOR_CHANGE);
animator.start();
}
代码示例来源:origin: frogermcs/InstaMaterial
ObjectAnimator bgAlphaAnim = ObjectAnimator.ofFloat(holder.vBgLike, "alpha", 1f, 0f);
bgAlphaAnim.setDuration(200);
bgAlphaAnim.setStartDelay(150);
bgAlphaAnim.setInterpolator(DECCELERATE_INTERPOLATOR);
代码示例来源:origin: xmuSistone/CardSlidePanel
public void setVisibilityWithAnimation(final int visibility, int delayIndex) {
if (visibility == View.VISIBLE && getVisibility() != View.VISIBLE) {
setAlpha(0);
setVisibility(visibility);
if (null != alphaAnimator) {
alphaAnimator.cancel();
}
alphaAnimator = ObjectAnimator.ofFloat(this, "alpha",
0.0f, 1.0f);
alphaAnimator.setDuration(360);
alphaAnimator.setStartDelay(delayIndex * 200);
alphaAnimator.start();
}
}
}
代码示例来源:origin: ZieIony/Carbon
@Override
protected Animator createSoftwareEnter(boolean fast) {
// Bounded ripples don't have enter animations.
if (mIsBounded) {
return null;
}
final int duration = (int)
(1000 * Math.sqrt(mTargetRadius / WAVE_TOUCH_DOWN_ACCELERATION * mDensity) + 0.5);
final ObjectAnimator tweenRadius = ObjectAnimator.ofFloat(this, TWEEN_RADIUS, 1);
AnimatorsCompat.setAutoCancel(tweenRadius);
// tweenRadius.setAutoCancel(true);
tweenRadius.setDuration(duration);
tweenRadius.setInterpolator(LINEAR_INTERPOLATOR);
tweenRadius.setStartDelay(RIPPLE_ENTER_DELAY);
final ObjectAnimator tweenOrigin = ObjectAnimator.ofFloat(this, TWEEN_ORIGIN, 1);
AnimatorsCompat.setAutoCancel(tweenOrigin);
// tweenOrigin.setAutoCancel(true);
tweenOrigin.setDuration(duration);
tweenOrigin.setInterpolator(LINEAR_INTERPOLATOR);
tweenOrigin.setStartDelay(RIPPLE_ENTER_DELAY);
final ObjectAnimator opacity = ObjectAnimator.ofFloat(this, OPACITY, 1);
AnimatorsCompat.setAutoCancel(opacity);
// opacity.setAutoCancel(true);
opacity.setDuration(OPACITY_ENTER_DURATION_FAST);
opacity.setInterpolator(LINEAR_INTERPOLATOR);
final AnimatorSet set = new AnimatorSet();
set.play(tweenOrigin).with(tweenRadius).with(opacity);
return set;
}
代码示例来源:origin: balysv/material-ripple
fade.setDuration(rippleFadeDuration);
fade.setInterpolator(new AccelerateInterpolator());
fade.setStartDelay(rippleDuration - rippleFadeDuration - FADE_EXTRA_DELAY);
fade.setStartDelay(0);
rippleAnimator.play(fade);
} else {
代码示例来源:origin: jdsjlzx/LRecyclerView
ObjectAnimator textAnimator = ObjectAnimator.ofPropertyValuesHolder(textView, holderA, holderYm).setDuration(1000);
textAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
textAnimator.setStartDelay(800);
代码示例来源:origin: nickbutcher/plaid
if (!run.startVisible) {
drawable.setAlpha(TRANSPARENT);
fade.setStartDelay((duration + startDelay) / 2);
} else {
fade.setStartDelay(startDelay);
SwitchDrawable.ALPHA,
OPAQUE, OPACITY_MID_TRANSITION, OPAQUE);
fade.setStartDelay(startDelay);
fade.setDuration(duration + startDelay);
fade.setInterpolator(linearInterpolator);
代码示例来源:origin: wangdan/AisenWeiBo
ObjectAnimator monthDayAnim = Utils.getPulseAnimator(mMonthAndDayView, 0.9F, 1.05F);
if (mDelayAnimation) {
monthDayAnim.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
ObjectAnimator yearAnim = Utils.getPulseAnimator(mYearView, 0.85F, 1.1F);
if (mDelayAnimation) {
yearAnim.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
代码示例来源:origin: wangdan/AisenWeiBo
pulseAnimator.setStartDelay(PULSE_ANIMATOR_DELAY);
代码示例来源:origin: iSoron/uhabits
pulseAnimator.setStartDelay(PULSE_ANIMATOR_DELAY);
代码示例来源:origin: arimorty/floatingsearchview
ObjectAnimator scaleYArrowAnim = ViewPropertyObjectAnimator.animate(mLeftAction).scaleY(1.0f).get();
ObjectAnimator fadeArrowAnim = ViewPropertyObjectAnimator.animate(mLeftAction).alpha(1.0f).get();
transXArrowAnim.setStartDelay(150);
scaleXArrowAnim.setStartDelay(150);
scaleYArrowAnim.setStartDelay(150);
fadeArrowAnim.setStartDelay(150);
代码示例来源:origin: wdullaer/MaterialDateTimePicker
pulseAnimator.setStartDelay(PULSE_ANIMATOR_DELAY);
代码示例来源:origin: iSoron/uhabits
1.05f);
if (mDelayAnimation) {
pulseAnimator.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
pulseAnimator = Utils.getPulseAnimator(mYearView, 0.85f, 1.1f);
if (mDelayAnimation) {
pulseAnimator.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
代码示例来源:origin: wdullaer/MaterialDateTimePicker
1.05f);
if (mDelayAnimation) {
pulseAnimator.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
ObjectAnimator pulseAnimator = Utils.getPulseAnimator(mYearView, 0.85f, 1.1f);
if (mDelayAnimation) {
pulseAnimator.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
代码示例来源:origin: mayubao/KuaiChuan
private ObjectAnimator create(View target, String propertyName, int repeatCount, long delay, float from, float to) {
ObjectAnimator animator = ObjectAnimator.ofFloat(target, propertyName, from, to);
animator.setRepeatCount(repeatCount);
animator.setRepeatMode(ObjectAnimator.RESTART);
animator.setStartDelay(delay);
return animator;
}
代码示例来源:origin: OCNYang/Android-Animation-Set
/**
* ObjectAnimator usage
*
* @param b
* @return
*/
public ObjectAnimator getObjectAnimator(boolean b) {
if (b) {
ObjectAnimator bgColorAnimator = ObjectAnimator.ofArgb(mPuppet,
"backgroundColor",
0xff009688, 0xff795548);
bgColorAnimator.setRepeatCount(1);
bgColorAnimator.setDuration(3000);
bgColorAnimator.setRepeatMode(ValueAnimator.REVERSE);
bgColorAnimator.setStartDelay(0);
return bgColorAnimator;
} else {
ObjectAnimator rotationXAnimator = ObjectAnimator.ofFloat(mPuppet,
"rotationX",
0f, 360f);
rotationXAnimator.setRepeatCount(1);
rotationXAnimator.setDuration(3000);
rotationXAnimator.setRepeatMode(ValueAnimator.REVERSE);
return rotationXAnimator;
}
}
内容来源于网络,如有侵权,请联系作者删除!