Just like the jitter of the QQ window, create the anim folder under the res of the project, and then create two xml files: cycle. xml and myanim. xml cycle. xml: <? Xml version = "1.0" encoding = "UTF-8"?> <CycleInterpolator xmlns: android = "http://schemas.android.com/apk/res/android" android: cycles = "2"/> myanim. xml: <? Xml version = "1.0" encoding = "UTF-8"?> <Set xmlns: android = "http://schemas.android.com/apk/res/android" android: interpolator = "@ anim/cycle"> <translate android: fromXDelta = "0" android: toXDelta = "-10" android: fromYDelta = "0" android: toYDelta = "-10" android: duration = "300"/> <translate android: fromXDelta = "0" android: toXDelta = "10" android: fromYDelta = "0" android: toYDelta = "-10" android: startOffset = "300" android: duration = "300"/> <translate android: fromXDelta = "0" android: toXDelta = "-10" android: fromYDelta = "0" android: toYDelta = "10" android: startOffset = "600" android: duration = "300"/> <translate android: fromXDelta = "0" android: toXDelta = "10" android: fromYDelta = "0" android: toYDelta = "10" android: startOffset = "900" android: duration = "300"/> </set> then use the Animation effect in the activity: Animation anim = AnimationUtils. loadAnimation (AnimActivity. this, R. anim. myanim); myButton. startAnimation (anim );