iphone 抖动效果
private Animation createFastRotateAnimation() {
Animation rotate = new RotateAnimation(-2.0f,
2.0f,
Animation.RELATIVE_TO_SELF,
0.5f,
Animation.RELATIVE_TO_SELF,
0.5f)
rotate.setRepeatMode(Animation.REVERSE)
rotate.setRepeatCount(Animation.INFINITE)
rotate.setDuration(60)
rotate.setInterpolator(new AccelerateDecelerateInterpolator())
return rotate
}
view设置放大动画
view.animate().scaleX(1.12f).scaleY(1.12f).setDuration(500).start()
view 快速放大缩小(点击效果)
private void iconAnim(View icon) {
Animator iconAnim = ObjectAnimator.ofPropertyValuesHolder(icon,
PropertyValuesHolder.ofFloat(View.SCALE_X, 1f, 1.5f, 1f),
PropertyValuesHolder.ofFloat(View.SCALE_Y, 1f, 1.5f, 1f));
iconAnim.start();
}