要实现抖动的效果,需要使用animation动画:
首先写1个 Interpolator - 定义一个动画的变化率(the rate of change)这使得基本的动画效果(alpha, scale, translate, rotate)得以加速,减速,重复等。
cycleinter.xml
<?xml version="1.0" encoding="utf-8"?>
<cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
android:cycles="10" />