/**
* 启动取消动画
*/
private void startCancelMenuAnima() {
ValueAnimator cancelAnima = ValueAnimator.ofFloat(1.f, 100.f);
cancelAnima.setDuration(500);
cancelAnima.setInterpolator(new AnticipateInterpolator());
cancelAnima.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
fraction = valueAnimator.getAnimatedFraction();
itemMenuRadius = (1 - fraction) * partSize;
itemIconSize = (int) ((1 - fraction) * iconSize);
invalidate();
}
});
cancelAnima.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
status = STATUS_MENU_CLOSED;
if (onMenuStatusChangeListener != null)
onMenuStatusChangeListener.onMenuClosed();
}
});
cancelAnima.start();
}
CircleMenu.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:TanTanPaneView
作者:
评论列表
文章目录