use of com.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.
the class SwitchAnimationUtil method runFlipHorizonAnimation.
private void runFlipHorizonAnimation(View view, long delay) {
view.setAlpha(0);
AnimatorSet set = new AnimatorSet();
ObjectAnimator objectAnimator1 = ObjectAnimator.ofFloat(view, "rotationY", -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.AnimatorSet in project UltimateAndroid by cymcsg.
the class SwitchAnimationUtil method runHorizonLeftAnimation.
private void runHorizonLeftAnimation(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.setDuration(mDuration);
set.setStartDelay(delay);
set.playTogether(objectAnimator, objectAnimatorAlpha);
set.start();
}
use of com.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.
the class SwitchAnimationUtil method runScaleAnimation.
private void runScaleAnimation(View view, long delay) {
view.setAlpha(0);
AnimatorSet set = new AnimatorSet();
ObjectAnimator objectAnimator2 = ObjectAnimator.ofFloat(view, "scaleX", 0f, 1f);
ObjectAnimator objectAnimator3 = ObjectAnimator.ofFloat(view, "scaleY", 0f, 1f);
ObjectAnimator objectAnimator4 = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
set.setDuration(mDuration);
set.playTogether(objectAnimator2, objectAnimator3, objectAnimator4);
set.setStartDelay(delay);
set.start();
}
use of com.nineoldandroids.animation.AnimatorSet in project AndroidViewHover by daimajia.
the class BlurLayout method startBlurImageAppearAnimator.
private void startBlurImageAppearAnimator() {
if (!enableBlurBackground || mBlurImage == null)
return;
AnimatorSet set = new AnimatorSet();
if (enableBackgroundZoom) {
set.playTogether(ObjectAnimator.ofFloat(mBlurImage, "alpha", 0.8f, 1f), ObjectAnimator.ofFloat(mBlurImage, "scaleX", 1f, mZoomRatio), ObjectAnimator.ofFloat(mBlurImage, "scaleY", 1f, mZoomRatio));
} else {
set.playTogether(ObjectAnimator.ofFloat(mBlurImage, "alpha", 0f, 1f));
}
set.addListener(mGlobalListener);
set.addListener(mGlobalAppearingAnimators);
set.setDuration(mBlurDuration);
set.start();
}
use of com.nineoldandroids.animation.AnimatorSet in project android-betterpickers by code-troopers.
the class RadialPickerLayout method setCurrentItemShowing.
/**
* Set either minutes or hours as showing.
*
* @param animate True to animate the transition, false to show with no animation.
*/
public void setCurrentItemShowing(int index, boolean animate) {
if (index != HOUR_INDEX && index != MINUTE_INDEX) {
Log.e(TAG, "TimePicker does not support view at index " + index);
return;
}
int lastIndex = getCurrentItemShowing();
mCurrentItemShowing = index;
if (animate && (index != lastIndex)) {
ObjectAnimator[] anims = new ObjectAnimator[4];
if (index == MINUTE_INDEX) {
anims[0] = mHourRadialTextsView.getDisappearAnimator();
anims[1] = mHourRadialSelectorView.getDisappearAnimator();
anims[2] = mMinuteRadialTextsView.getReappearAnimator();
anims[3] = mMinuteRadialSelectorView.getReappearAnimator();
} else if (index == HOUR_INDEX) {
anims[0] = mHourRadialTextsView.getReappearAnimator();
anims[1] = mHourRadialSelectorView.getReappearAnimator();
anims[2] = mMinuteRadialTextsView.getDisappearAnimator();
anims[3] = mMinuteRadialSelectorView.getDisappearAnimator();
}
if (mTransition != null && mTransition.isRunning()) {
mTransition.end();
}
mTransition = new AnimatorSet();
mTransition.playTogether(anims);
mTransition.start();
} else {
int hourAlpha = (index == HOUR_INDEX) ? 255 : 0;
int minuteAlpha = (index == MINUTE_INDEX) ? 255 : 0;
ViewHelper.setAlpha(mHourRadialTextsView, hourAlpha);
ViewHelper.setAlpha(mHourRadialSelectorView, hourAlpha);
ViewHelper.setAlpha(mMinuteRadialTextsView, minuteAlpha);
ViewHelper.setAlpha(mMinuteRadialSelectorView, minuteAlpha);
}
}
Aggregations