I moved to using an AnimationListener to make the view invisible at the end of the animation. That seems more correct now but it still doesn't improve the speed or smoothness (yes - i want to know how to do that too) of the animation.
Here is my listener : class TestAnimListener implements AnimationListener { @Override public void onAnimationEnd(Animation arg0) { // TODO Auto-generated method stub gv.setVisibility(View.INVISIBLE); } @Override public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } @Override public void onAnimationStart(Animation arg0) { // TODO Auto-generated method stub } } and I set it on the animation as follows: a.setAnimationListener(new TestAnimListener()); Rohit On Nov 11, 1:01 pm, Rohit Mordani <[EMAIL PROTECTED]> wrote: > I have a Grid View and it has 6 jpeg images. I am applying a scale and > alpha animation to that grid and then at the end of the animation i > set the visibility of that view to invisible. The animation seems > slow. I tried to use an AccelerateInterpolator but that doesnt seem to > help. Is there a way to speed up the animation? Here is what my > animation looks like (testanim.xml) > > <?xml version="1.0" encoding="utf-8"?> > <set xmlns:android="http://schemas.android.com/apk/res/android"> > > <alpha android:fromAlpha="0.2" android:toAlpha="1.0" > android:duration="300" /> > > <scale android:duration="300" android:fillAfter="true" > android:fromXScale="1.75" android:toXScale="1" > android:fromYScale="1.75" android:toYScale="1" > android:pivotX="50%" android:pivotY="50%" /> > > </set> > > I load this animation in java as follows.... > > GridView gv = (GridView) findViewById(R.id.grid); > Animation a = AnimationUtils.loadAnimation(this, R.anim.testanim); > a.setInterpolator(new LinearInterpolator()); > gv.startAnimation(a); > gv.setVisibility(View.INVISIBLE); > > any ideas what I need to do to speed up the animation? --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---