I want to add animation on imageview.
I've one Imageview and my image list.
when i click on image list item then that image will be set on imageview with animation. and all that image coming from server. I want animation like old image will move to left and new image comes from right.
here is my code that i'm using for setting the animation.
In OnCreate Method
final Animation animationSlideIn = AnimationUtils.loadAnimation(this, R.anim.slide_in_left);
final Animation animationSlideOut = AnimationUtils.loadAnimation(this, R.anim.slide_out_left);
code for set the image in imageview when click on image list
public void onItemClick(AdapterView<?> parent, View v, int pos,
long arg3) {
// TODO Auto-generated method stub
mPosition = pos;
mImageView.startAnimation(animationSlideOut);
ImageLoading.BitmapManager.INSTANCE.loadBitmap( _imageURL[mPosition] , mImageView, 0, 0);
mImageView.startAnimation(animationSlideIn);
}
});
when i run this. it shows only this animation.
mImageView.startAnimation(animationSlideIn);
here is my app screen.
How i can add both animation on this. where i'm wrong on this.
Thanks in andvance..
0 comments:
Post a Comment