ok - thanks !

Rohit


On Nov 11, 2:33 pm, Romain Guy <[EMAIL PROTECTED]> wrote:
> Because it's a lot of work to perform in software: you are compositing
> a fullscreen scaled and translucent bitmap. Android does not offer 2D
> hardware acceleration yet, so this kind of animation is expensive.
>
>
>
> On Tue, Nov 11, 2008 at 2:29 PM, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> > Is there a particular reason as to why it will be slow? I have a grid
> > of only 6 images (each image (png) is about 40Kb).
>
> > Rohit
>
> > On Nov 11, 2:00 pm, Romain Guy <[EMAIL PROTECTED]> wrote:
> >> It depends on the rest of your UI. But if you're animating a
> >> fullscreen GridView, it's gonna be slow on the G1 (unfortunately.)
>
> >> On Tue, Nov 11, 2008 at 1:27 PM, Rohit Mordani <[EMAIL PROTECTED]> wrote:
>
> >> > Hmmm...ok - I thought that it might be trying to set the view to
> >> > invisible while the animation is going on and that might cause some
> >> > choppiness. You're saying that that is not the case? How can I make
> >> > the animation smoother and snappier?
>
> >> > Rohit
>
> >> > On Nov 11, 1:18 pm, Romain Guy <[EMAIL PROTECTED]> wrote:
> >> >> Actually the way you did it earlier is simpler and is meant to work.
> >> >> No need for a listener.
>
> >> >> On Tue, Nov 11, 2008 at 1:14 PM, Rohit Mordani <[EMAIL PROTECTED]> 
> >> >> wrote:
>
> >> >> > 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 {
> >> >> >       [EMAIL PROTECTED]
> >> >> >        public void onAnimationEnd(Animation arg0) {
> >> >> >                // TODO Auto-generated method stub
> >> >> >                gv.setVisibility(View.INVISIBLE);
> >> >> >        }
>
> >> >> >       [EMAIL PROTECTED]
> >> >> >        public void onAnimationRepeat(Animation animation) {
> >> >> >                // TODO Auto-generated method stub
>
> >> >> >        }
>
> >> >> >       [EMAIL PROTECTED]
> >> >> >        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?
>
> >> >> --
> >> >> Romain Guywww.curious-creature.org
>
> >> --
> >> Romain Guywww.curious-creature.org
>
> --
> Romain Guywww.curious-creature.org
--~--~---------~--~----~------------~-------~--~----~
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