Search in sources :

Example 6 with SupportAnimator

use of io.codetail.animation.SupportAnimator in project MaterialCalendar by Haoxiqiang.

the class MemoFragment method disappearRed.

void disappearRed() {
    int cx = mRed.getWidth() / 2;
    int cy = mRed.getHeight() / 2;
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, mRed.getWidth() / 2, 0);
    animator.addListener(new SimpleListener() {

        @Override
        public void onAnimationEnd() {
            mRed.setVisibility(View.INVISIBLE);
            ViewHelper.setX(mRed, startRedX);
            ViewHelper.setY(mRed, startRedY);
            release();
        }
    });
    animator.setInterpolator(DECELERATE);
    animator.start();
}
Also used : SupportAnimator(io.codetail.animation.SupportAnimator)

Example 7 with SupportAnimator

use of io.codetail.animation.SupportAnimator in project MaterialCalendar by Haoxiqiang.

the class MemoFragment method appearRed.

void appearRed() {
    mRed.setVisibility(View.VISIBLE);
    int cx = mRed.getWidth() / 2;
    int cy = mRed.getHeight() / 2;
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mRed, cx, cy, 0, mRed.getWidth() / 2);
    animator.addListener(new SimpleListener() {

        @Override
        public void onAnimationEnd() {
            upRed();
        }
    });
    animator.setInterpolator(ACCELERATE);
    animator.start();
}
Also used : SupportAnimator(io.codetail.animation.SupportAnimator)

Example 8 with SupportAnimator

use of io.codetail.animation.SupportAnimator in project MaterialCalendar by Haoxiqiang.

the class MemoFragment method disappearBluePair.

void disappearBluePair() {
    float finalRadius = Math.max(mBluePair.getWidth(), mBluePair.getHeight()) * 1.5f;
    SupportAnimator animator = ViewAnimationUtils.createCircularReveal(mBluePair, endBlueX, endBlueY, finalRadius, mBlue.getWidth() / 2f);
    animator.setDuration(500);
    animator.addListener(new SimpleListener() {

        @Override
        public void onAnimationEnd() {
            mBluePair.setVisibility(View.INVISIBLE);
            returnBlue();
        }
    });
    animator.setInterpolator(DECELERATE);
    animator.start();
}
Also used : SupportAnimator(io.codetail.animation.SupportAnimator)

Example 9 with SupportAnimator

use of io.codetail.animation.SupportAnimator in project AndroidDevelop by 7449.

the class ToolbarSearchFragment method initAnimator.

private void initAnimator(int type) {
    SupportAnimator mRevealAnimator = ViewAnimationUtils.createCircularReveal(mRevealLayout, centerX, centerY, 20, hypo(mRevealLayout.getWidth(), mRevealLayout.getHeight()));
    if (type == SupportAnimatorListener.TYPE_END) {
        mRevealAnimator = mRevealAnimator.reverse();
    }
    mRevealAnimator.addListener(new SupportAnimatorListener(type, this));
    mRevealAnimator.setDuration(500);
    mRevealAnimator.setStartDelay(100);
    mRevealAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
    mRevealAnimator.start();
}
Also used : SupportAnimator(io.codetail.animation.SupportAnimator) AccelerateDecelerateInterpolator(android.view.animation.AccelerateDecelerateInterpolator)

Aggregations

SupportAnimator (io.codetail.animation.SupportAnimator)9 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)2 Animator (android.animation.Animator)1 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)1 ValueAnimator (android.animation.ValueAnimator)1 Intent (android.content.Intent)1 BitmapDrawable (android.graphics.drawable.BitmapDrawable)1 View (android.view.View)1 AccelerateInterpolator (android.view.animation.AccelerateInterpolator)1 LinearLayout (android.widget.LinearLayout)1 ContentFragment (yalantis.com.sidemenu.sample.fragment.ContentFragment)1