Issue
does anybody know is there any xml animation that enables button to bounce for a few seconds. If you can and have share some examples...
Solution
Here is a simple way to do it using an ObjectAnimator. If you want this to work pre-honeycomb, you can either use the same syntax and do it with a view animation, or use NineOldAndroids.
ObjectAnimator animY = ObjectAnimator.ofFloat(button, "translationY", -100f, 0f);
animY.setDuration(1000);//1sec
animY.setInterpolator(new BounceInterpolator());
animY.setRepeatCount(numRepeats);
animY.start();
Answered By - Jameo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.