I haven't worked to much with animations but the ones I have that slide in
from the right look like this:
Animation inFromRight = new TranslateAnimation(
Animation.RELATIVE_TO_PARENT, +1.0f,
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f
);
inFromRight.setDuration(600);
inFromRight.setInterpolator(new
AccelerateInterpolator());
maybe try to copy and paste that into your app and see if it changes
anything. They look almost the same to me except for some numbers and
AccelerateInterpolator that I use..... Let me know if it works if you
copy/paste it.
Tommy
Android Mobile Phone Application Developer
Database Administrator
.net Web Specialist
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of ClarkBattle
Sent: Friday, September 17, 2010 3:37 PM
To: Android Developers
Subject: [android-developers] TextView resets its location after an
animation
I am using a Translate animation on a text view.
TranslateAnimation animation = new
TranslateAnimation(
TranslateAnimation.RELATIVE_TO_SELF, 0.0f,
TranslateAnimation.RELATIVE_TO_SELF, 0.8f,
TranslateAnimation.RELATIVE_TO_SELF, 0f,
TranslateAnimation.RELATIVE_TO_SELF, 0f );
animation.setDuration( ANIMATION_DURATION );
animation.setInterpolator( new
DecelerateInterpolator() );
myTextView.startAnimation( animation );
This works in that it slides the text view to the right. However,
when the animation is complete it puts the text view right back where
it started! I was under the impression tat the view should remain
where the animation left it. Why does this happen?
Thanks
--
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
--
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