抖动动画

/**
* 选择离店日期后超过最大入住数后的抖动动画
*
* @param cylesTimes
* @return
*/
public Animation shakeAnimation(int cylesTimes) {
Animation translateAnimation = new TranslateAnimation(0, 15, 0, 0);
translateAnimation.setInterpolator(new CycleInterpolator(cylesTimes));
translateAnimation.setDuration(500);
return translateAnimation;
}

你可能感兴趣的:(抖动动画)