use of com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.
the class BlurLayout method startBlurImageDisappearAnimator.
private void startBlurImageDisappearAnimator() {
if (!enableBlurBackground || mBlurImage == null)
return;
AnimatorSet set = new AnimatorSet();
if (enableBackgroundZoom)
set.playTogether(ObjectAnimator.ofFloat(mBlurImage, "alpha", 1f, 0.8f), ObjectAnimator.ofFloat(mBlurImage, "scaleX", mZoomRatio, 1f), ObjectAnimator.ofFloat(mBlurImage, "scaleY", mZoomRatio, 1f));
else
set.playTogether(ObjectAnimator.ofFloat(mBlurImage, "alpha", 1f, 0f));
set.addListener(mGlobalListener);
set.addListener(mGlobalDisappearAnimators);
set.setDuration(mBlurDuration);
set.start();
}
use of com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.
the class ResideMenu method buildMenuAnimation.
private AnimatorSet buildMenuAnimation(View target, float alpha) {
AnimatorSet alphaAnimation = new AnimatorSet();
alphaAnimation.playTogether(ObjectAnimator.ofFloat(target, "alpha", alpha));
alphaAnimation.setDuration(250);
return alphaAnimation;
}
use of com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.
the class ResideMenu method openMenu.
/**
* show the reside menu;
*/
public void openMenu(int direction) {
setScaleDirection(direction);
isOpened = true;
AnimatorSet scaleDown_activity = buildScaleDownAnimation(viewActivity, mScaleValue, mScaleValue);
AnimatorSet scaleDown_shadow = buildScaleDownAnimation(imageViewShadow, mScaleValue + shadowAdjustScaleX, mScaleValue + shadowAdjustScaleY);
AnimatorSet alpha_menu = buildMenuAnimation(scrollViewMenu, 1.0f);
scaleDown_shadow.addListener(animationListener);
scaleDown_activity.playTogether(scaleDown_shadow);
scaleDown_activity.playTogether(alpha_menu);
scaleDown_activity.start();
}
use of com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.
the class ResideMenu method buildScaleUpAnimation.
/**
* a helper method to build scale up animation;
*
* @param target
* @param targetScaleX
* @param targetScaleY
* @return
*/
private AnimatorSet buildScaleUpAnimation(View target, float targetScaleX, float targetScaleY) {
AnimatorSet scaleUp = new AnimatorSet();
scaleUp.playTogether(ObjectAnimator.ofFloat(target, "scaleX", targetScaleX), ObjectAnimator.ofFloat(target, "scaleY", targetScaleY));
scaleUp.setDuration(250);
return scaleUp;
}
use of com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet in project UltimateAndroid by cymcsg.
the class ResideMenu method buildScaleDownAnimation.
/**
* a helper method to build scale down animation;
*
* @param target
* @param targetScaleX
* @param targetScaleY
* @return
*/
private AnimatorSet buildScaleDownAnimation(View target, float targetScaleX, float targetScaleY) {
AnimatorSet scaleDown = new AnimatorSet();
scaleDown.playTogether(ObjectAnimator.ofFloat(target, "scaleX", targetScaleX), ObjectAnimator.ofFloat(target, "scaleY", targetScaleY));
scaleDown.setInterpolator(AnimationUtils.loadInterpolator(activity, android.R.anim.decelerate_interpolator));
scaleDown.setDuration(250);
return scaleDown;
}
Aggregations