public void startAnimation(View[] views) {
isOpen = true;
fabReLayout.setVisibility(View.VISIBLE);
if (VersionHelper.isAtLeast()) {
/**
*ObjectAnimator
* */
for (int i = 0; i < views.length; i++) {
objectAnimator = ObjectAnimator.ofFloat(views[i], "translationY", 0, -(i * 250));
objectAnimator.setStartDelay(i * 150);
objectAnimator.setDuration(700);
objectAnimator.setInterpolator(new BounceInterpolator());
objectAnimator.start();
}
} else {
/**
*ViewCompat
* */
for (int i = 0; i < views.length; i++) {
ViewCompat.animate(views[i]).translationY(i * -ConverTool.px2dip(this, 400)).setDuration(600).setInterpolator(new BounceInterpolator()).start();
}
}
}
MainActivity.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:GankWL
作者:
评论列表
文章目录