Use a layout animation listener instead.

On Mon, Jun 8, 2009 at 3:00 PM, az9702<[email protected]> wrote:
>
> Hi,
>
> I am implementing a two-step animation:
> (1) Displaying a set of images using Grid layout (similar to Api Demo
> LayoutAmination4)
> (2) Upon (1) completion, rotate out Grid layout around Y-axis & rotate
> in another layout
>
> Step#2 is similar to Api Demo Rotate3dAnimation but it is triggered w/
> o any user input.
> As soon as (1) is completed, (2) should occur automatically.
>
> To do that, I use  LayoutAnimationController isDone to detect if all
> child views of the grid layout are animated:
>
> ...
>
> LayoutAnimationController animControl = mImageView.getLayoutAnimation
> ();
> ...
>  if(animControl.isDone()) {
>                Toast.makeText(this, "Animation Done - start rotation",
> 2000).show();
>
>                applyRotation(0.0f, 90.0f);
>        }
>
>
> The above did not work  - rotation always starts before the Grid
> layout is completed.
>
> As a workaround, I am using post with a delay - but I want to do w/o
> any guess delays.
> I also experiemented Animation "hasEnded()" but no effect.
>
> Does anyone have similar experience with the controller ?  Is "IsDone
> ()" the correct way to detect the end of the first animation ?
>
> Thanks in advance.
>
> - Simon
>
>
>
>
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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