Search in sources :

Example 6 with AnimatorSet

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();
}
Also used : AnimatorSet(com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet)

Example 7 with AnimatorSet

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;
}
Also used : AnimatorSet(com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet)

Example 8 with AnimatorSet

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();
}
Also used : AnimatorSet(com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet)

Example 9 with AnimatorSet

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;
}
Also used : AnimatorSet(com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet)

Example 10 with AnimatorSet

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;
}
Also used : AnimatorSet(com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet)

Aggregations

AnimatorSet (com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorSet)13 Animator (com.marshalchen.common.uimodule.nineoldandroids.animation.Animator)5 View (android.view.View)4 ObjectAnimator (com.marshalchen.common.uimodule.nineoldandroids.animation.ObjectAnimator)4 ListView (android.widget.ListView)3 AnimatorListenerAdapter (com.marshalchen.common.uimodule.nineoldandroids.animation.AnimatorListenerAdapter)3 ValueAnimator (com.marshalchen.common.uimodule.nineoldandroids.animation.ValueAnimator)2 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)1 LinearInterpolator (android.view.animation.LinearInterpolator)1 AdapterView (android.widget.AdapterView)1 BaseEasingMethod (com.marshalchen.common.uimodule.easing.BaseEasingMethod)1 Skill (com.marshalchen.common.uimodule.easing.Skill)1 AnimatorProxy (com.marshalchen.common.uimodule.nineoldandroids.view.animation.AnimatorProxy)1 Entry (java.util.Map.Entry)1