I am working on Android onlineShopping application.I have to apply some animation.
- cart image is displays on Right-top corner of the screen.
- List of items are on screen each item with "Add to cart" button.
- When user press this button I have to play animation.
- I have one fix image which should animate from touch position to cart-image placed on right-top corner of the screen.
Please help me out.
Thanks in advance.
Update :
I Tried this to move image from one place to another.
TranslateAnimation anim = new TranslateAnimation(0,0,200,200);
anim.setDuration(3000);
img.startAnimation(anim);
This image I want to animate from touch position to right-top corner.
ultimately you want to move a view from one position to another position with animation.
Step 1: get initial position of that view
Step 2: get destination position
Step 3: create a class to manage animation
Step 4: add animationlistener and start animation on desired view
//now start animation as mentioned below:
I hope it will be helpful !!
I think you are exactly looking for, you can check link
link here
check this example hope this will help u: http://developer.android.com/training/animation/zoom.html