I believe the error is android:fromXDelta="100%" in your second translate. Did you mean android:fromXDelta="-100%"?
On Wed, Aug 18, 2010 at 7:30 AM, marmor <gazith@gmail.com> wrote:
Hi, I would like to animate a view I have to appear like it was
sliding off the screen to the left, and then sliding back to the
screen from the right.
I've tried the following animation set:
<translate
android:interpolator="@android:anim/
accelerate_decelerate_interpolator"
android:fromXDelta="0.0"
android:toXDelta="-100%"
android:fromYDelta="0.0"
android:toYDelta="0.0"
android:fillAfter="false"
android:duration="1000" />
<translate
android:interpolator="@android:anim/
accelerate_decelerate_interpolator"
android:fromXDelta="100%"
android:toXDelta="0.0"
android:fromYDelta="0.0"
android:toYDelta="0.0"
android:fillAfter="false"
android:startOffset="1000"
android:duration="1000" />
I've set the duration of the first and the startOffset of the second
as 1000, so the second should start right after the first ends.
Instead I get their order reversed and I see my view sliding from
right into the screen, and then sliding off the screen to the left.
Reversing the animations order didn't do anything.
Anyone got a clue why is this happening, and how can I do what I want?
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment