use of android.view.animation.CycleInterpolator in project FlycoDialog_Master by H07000223.
the class ShakeHorizontal method setAnimation.
@Override
public void setAnimation(View view) {
ObjectAnimator animator = ObjectAnimator.ofFloat(view, "translationX", -10, 10);
animator.setInterpolator(new CycleInterpolator(5));
animatorSet.playTogether(animator);
/**
* <pre>
* 另一种shake实现
* ObjectAnimator.ofFloat(view, "translationX", 0, 25, -25, 25, -25, 15, -15, 6, -6, 0);
* </pre>
*/
}
use of android.view.animation.CycleInterpolator in project SeaStar by 13120241790.
the class ClearWriteEditText method shakeAnimation.
/**
* 晃动动画
* @param counts 半秒钟晃动多少下
* @return
*/
public static Animation shakeAnimation(int counts) {
Animation translateAnimation = new TranslateAnimation(0, 10, 0, 0);
translateAnimation.setInterpolator(new CycleInterpolator(counts));
translateAnimation.setDuration(500);
return translateAnimation;
}
use of android.view.animation.CycleInterpolator in project smartmodule by carozhu.
the class ClearEditText method shakeAnimation.
/**
* 晃动动画
*
* @param counts 1秒钟晃动多少下
* @return
*/
public static Animation shakeAnimation(int counts) {
Animation translateAnimation = new TranslateAnimation(0, 10, 0, 0);
translateAnimation.setInterpolator(new CycleInterpolator(counts));
translateAnimation.setDuration(1000);
return translateAnimation;
}
Aggregations