You simply need to use setFillAfter(true).

On Wed, Jun 30, 2010 at 12:59 AM, zohar lerman <[email protected]> wrote:
> Hi,
>
> I want to move a view from location (x,y) to (x1,y1).
> What is the best way to do it?
> I tried using the following code but it cannot stay at the last point
> (x1,y1),it always translate back:
> TranslateAnimation anim = new TranslateAnimation(
>        Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
>        Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
>
> anim.setDuration(100);
> anim.setInterpolator(new LinearInterpolator());
> this.startAnimation(anim);
>
> any suggestions?
>
> thanks
> Z
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to