开发者

Image rumble in Android app

开发者 https://www.devze.com 2023-03-13 10:38 出处:网络
I have a quiz of sorts. There are a couple images at the top.What I\'d like to 开发者_开发知识库do is when a wrong answer is given, rumble one if the images for a second or two and have it settle back

I have a quiz of sorts. There are a couple images at the top. What I'd like to 开发者_开发知识库do is when a wrong answer is given, rumble one if the images for a second or two and have it settle back into position. Just a small shake in the X and Y. Is this doable? The images are in the same layout as the rest. I don't know if that matters.

Thanks for the help


There's a demo of this in the API Demos, under Views/Animation/Shake.


You can probably use a simple View animation to alter the position as outlined at http://developer.android.com/guide/topics/graphics/view-animation.html.

0

精彩评论

暂无评论...
验证码 换一张
取 消