Hello,
Hoping that someone can provide some insights into how android
animations work.
In the onCreate() method of file LayoutAnimation2.java, we have the
following AnimationSet being created
AnimationSet set = new AnimationSet(true);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(50);
set.addAnimation(animation);
animation = 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
);
animation.setDuration(100);
set.addAnimation(animation);
First I dont understand why there needs to be a translate animation in
addition to an AlphaAnimation. Anyway, if I comment out the last line
from the above code snippet. i.e., the AnimationSet now only has an
AlphaAnimation in it, the something very strange happens. The ListView
renders without any text being shownuntil we hit a down-arrow key.
An then the list text shows up animating itself as expected.
So, for you experts out there, what the heck is going on?
- Why does one need these two animations added to the set
- Why does the ListView rendering stall the way it does
- Why does hitting a key-stroke get it unstuck
- Why is the ApiDemos code not commented at all? (this one is an extra
credit question)
Thanks in advance,
DS.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---