views:

41

answers:

0

Hi all,

I m really stuck in the animation part of my project. i want to do something like this:

  1. i have one image. and i want to translate it to the new place through translate animation.
  2. it also animates.

here is code for the same.

public void animationtshowcard1() {
Animation a= new TranslateAnimation(2,-50,2,25); a.setDuration(200);
showcard1.startAnimation(a); a.setStartOffset(2500); a.setFillAfter(true);

}

now the problem is:

  1. when i set the image in XML i set it Invisible.
  2. i m also setting the image invisible in oncreate() method.and on click button also also.

    BUT NOW PROBLEM IS WHEN I CLICK ON BUTTON IT IS VISIBLE ON ITS ORIGINAL PLACE AND THEN TRANSLATES TO NEXT LOCATION. I DNT WANT TO MAKE IT VISIBLE UNTIL IT ENDS THE ANIMATION AND IT SHOULD BE VISIBLE ON NEW PLACE.

PLS HELP ME IN THIS CASE.

tHANKS IN ADVANCE :-(