animation on image view on grid view

Posted by yahska on Stack Overflow See other posts from Stack Overflow or by yahska
Published on 2013-10-26T09:51:52Z Indexed on 2013/10/26 9:53 UTC
Read the original article Hit count: 236

Filed under:
|

i am having a grid view with 2 coloums and each item in grid view having one image and 2 textview below the image. i have added one button over each image and after clicking on button i want that image should scale and move down to bottom tab. like it should appear image drop down from its position in side one button of tabview.

i am able to add animation on image using this code

AnimationSet set = new AnimationSet(true);

Animation trAnimation = new TranslateAnimation(0, 160,0, 100);

trAnimation.setDuration(500);

set.addAnimation(trAnimation);

Animation scaleAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_scale);

set.addAnimation(scaleAnimation);

set.setFillEnabled(true) ;

set.setFillAfter(true);

view.setAlpha(100) ;

view.startAnimation(set);

but problem is that image is not coming to bottom of screen it is going inside of grid item where it is placed . anybody knows how to move this image to bottom.

© Stack Overflow or respective owner

Related posts about android

Related posts about animation