use of io.codetail.animation.arcanimator.ArcAnimator in project material-sheet-fab by gowong.
the class FabAnimation method startArcAnim.
protected void startArcAnim(View view, float endX, float endY, float degrees, Side side, long duration, Interpolator interpolator, final AnimationListener listener) {
// Setup animation
// Cast end coordinates to ints so that the FAB will be animated to the same position even
// when there are minute differences in the coordinates
ArcAnimator anim = ArcAnimator.createArcAnimator(view, (int) endX, (int) endY, degrees, side);
anim.setDuration(duration);
anim.setInterpolator(interpolator);
// Add listener
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
if (listener != null) {
listener.onStart();
}
}
@Override
public void onAnimationEnd(Animator animation) {
if (listener != null) {
listener.onEnd();
}
}
});
// Start animation
anim.start();
}
use of io.codetail.animation.arcanimator.ArcAnimator in project MaterialCalendar by Haoxiqiang.
the class MemoFragment method returnBlue.
void returnBlue() {
mBlue.setVisibility(View.VISIBLE);
ArcAnimator arcAnimator = ArcAnimator.createArcAnimator(mBlue, startBlueX, startBlueY, 90, Side.LEFT).setDuration(500);
arcAnimator.start();
}
Aggregations