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();
}
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();
}
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();
}
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();
}
Aggregations