use of com.nineoldandroids.animation.ObjectAnimator in project UltimateAndroid by cymcsg.
the class SwitchAnimationUtil method runFlipVertialAnimation.
private void runFlipVertialAnimation(View view, long delay) {
view.setAlpha(0);
AnimatorSet set = new AnimatorSet();
ObjectAnimator objectAnimator1 = ObjectAnimator.ofFloat(view, "rotationX", -180f, 0f);
ObjectAnimator objectAnimator2 = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
set.setDuration(mDuration);
set.playTogether(objectAnimator1, objectAnimator2);
set.setStartDelay(delay);
set.start();
}
use of com.nineoldandroids.animation.ObjectAnimator in project UltimateAndroid by cymcsg.
the class SwitchAnimationUtil method runRotateAnimation.
private void runRotateAnimation(View view, long delay) {
view.setAlpha(0);
AnimatorSet set = new AnimatorSet();
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "rotation", 0f, 360f);
ObjectAnimator objectAnimator2 = ObjectAnimator.ofFloat(view, "scaleX", 0f, 1f);
ObjectAnimator objectAnimator3 = ObjectAnimator.ofFloat(view, "scaleY", 0f, 1f);
ObjectAnimator objectAnimator4 = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
objectAnimator2.setInterpolator(new AccelerateInterpolator(1.0f));
objectAnimator3.setInterpolator(new AccelerateInterpolator(1.0f));
set.setDuration(mDuration);
set.playTogether(objectAnimator, objectAnimator2, objectAnimator3, objectAnimator4);
set.setStartDelay(delay);
set.start();
}
use of com.nineoldandroids.animation.ObjectAnimator in project UltimateAndroid by cymcsg.
the class SwitchAnimationUtil method runHorizonRightAnimation.
private void runHorizonRightAnimation(View view, long delay) {
view.setAlpha(0);
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "translationX", ViewUtils.getScreenWidth(), 0);
objectAnimator.setInterpolator(new LinearInterpolator());
ObjectAnimator objectAnimatorAlpha = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
AnimatorSet set = new AnimatorSet();
set.setStartDelay(delay);
set.setDuration(mDuration);
set.playTogether(objectAnimator, objectAnimatorAlpha);
set.start();
}
use of com.nineoldandroids.animation.ObjectAnimator in project HoloEverywhere by Prototik.
the class DateTimePickerUtils method getPulseAnimator.
/**
* Render an animator to pulsate a view in place.
*
* @param labelToAnimate the view to pulsate.
* @return The animator object. Use .start() to begin.
*/
public static ObjectAnimator getPulseAnimator(View labelToAnimate, float decreaseRatio, float increaseRatio) {
Keyframe k0 = Keyframe.ofFloat(0f, 1f);
Keyframe k1 = Keyframe.ofFloat(0.275f, decreaseRatio);
Keyframe k2 = Keyframe.ofFloat(0.69f, increaseRatio);
Keyframe k3 = Keyframe.ofFloat(1f, 1f);
PropertyValuesHolder scaleX = PropertyValuesHolder.ofKeyframe(sPropertyScaleX, k0, k1, k2, k3);
PropertyValuesHolder scaleY = PropertyValuesHolder.ofKeyframe(sPropertyScaleY, k0, k1, k2, k3);
ObjectAnimator pulseAnimator = ObjectAnimator.ofPropertyValuesHolder(labelToAnimate, scaleX, scaleY);
pulseAnimator.setDuration(PULSE_ANIMATOR_DURATION);
return pulseAnimator;
}
use of com.nineoldandroids.animation.ObjectAnimator in project HoloEverywhere by Prototik.
the class RadialSelectorView method getDisappearAnimator.
public ObjectAnimator getDisappearAnimator() {
if (!mIsInitialized || !mDrawValuesReady) {
Log.e(TAG, "RadialSelectorView was not ready for animation.");
return null;
}
Keyframe kf0, kf1;
kf0 = Keyframe.ofFloat(0f, 1f);
kf1 = Keyframe.ofFloat(1f, 0f);
PropertyValuesHolder fade = PropertyValuesHolder.ofKeyframe("alpha", kf0, kf1);
ObjectAnimator disappearAnimator = ObjectAnimator.ofPropertyValuesHolder(this, fade).setDuration(300);
disappearAnimator.addUpdateListener(mInvalidateUpdateListener);
return disappearAnimator;
}
Aggregations