开发者

Android :: Image click animation

This is my requirement in Android . I need to display a tiny image. When the user presses the image the image should zoom in slightly and go back to it's 开发者_如何学JAVAoriginal position, thus giving the impression that the image has been clicked. How do I go about doing this? (I tried using 2 different images (using image selector) in imageview, but both images got scaled to the view size and hence there was no animation visible)

Please help.

Regards, Sam


If you want only increase image size when it pressed (without animation) - selector is right way, and it should work.

May be you set wrong layout params or scaleType for ImageView.

If you want to see smooth animation, when user click on imageview, you should add onClickListener to your ImageView and add proper Animation on onClick handler.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜