That's exactly what I've been doing after my post here, and it works
OK :
class LocalAnimationListener implements AnimationListener
{
public void onAnimationEnd(Animation animation)
{
Handler curHandler = new Handler();
curHandler.postDelayed( mLaunchSecondAnimation, 1);
//LaunchOutAnimation( );
}
public void onAnimationRepeat(Animation animation)
{
}
public void onAnimationStart(Animation animation)
{
}
};
private Runnable mLaunchSecondAnimation = new Runnable()
{
public void run()
{
LaunchOutAnimation( );
}
};
Thanks for the (good) proposition anyway !!
Emmanuel
http://androidblogger.blogspot.com/
Ps: Now I have to consult the doc, because I don't know View.post and
Activity.runOnUiThread()
:)
On Jan 7, 2:00 am, Romain Guy <[email protected]> wrote:
> You should try to post it (see View.post() or Handler.post() or
> Activity.runOnUiThread().)
>
>
>
> On Tue, Jan 6, 2009 at 4:57 PM, Emmanuel <[email protected]> wrote:
>
> > It's strange.
> > That exactly what I'm doing, starting a second animation on the
> > onAnimationEnd of the first animation listener, but it just don't do
> > anything.
> > the second animation is not played.
>
> > Just to be sure, I call the function that creates the first animation
> > on the onAnimationEnd ( to create a dirty 'repeat' pattern ), but it
> > just don't do anything.
> > Is it possible that something like a clear animation would be called
> > AFTER the animationEnd callback, and remove the new animation ?
>
> > Emmanuel
> >http://androidblogger.blogspot.com/
>
> > On Jan 6, 11:44 pm, Romain Guy <[email protected]> wrote:
> >> You can achieve it by using two Animations. Start the first one and
> >> when it ends (using an animation listener to be notified), start the
> >> second one. It's not as nice and easy but it should work.
>
> >> On Tue, Jan 6, 2009 at 2:43 PM, Sundog <[email protected]> wrote:
>
> >> > Ahh, thank you. I knew "the answer was out there".
>
> >> > So much for my cool animation...
>
> >> > On Jan 6, 3:20 pm, Romain Guy <[email protected]> wrote:
> >> >> It is a known issue.
>
> >> >> On Tue, Jan 6, 2009 at 2:17 PM, Sundog <[email protected]> wrote:
>
> >> >> > That category is getting a little crowded for my tastes.
>
> >> >> > On Jan 6, 3:15 pm, loty <[email protected]> wrote:
> >> >> >> I've seen this one too and gave up.
> >> >> >> I guess we'll have to file into "Nobody knows nobody cares" category
>
> >> >> >> On Jan 6, 4:06 pm, Sundog <[email protected]> wrote:
>
> >> >> >> > We'll settle for a "No, you dummies, you're doing it wrong!"
>
> >> >> >> > On Jan 6, 8:19 am, Sundog <[email protected]> wrote:
>
> >> >> >> > > I posted about exactly this a couple of days ago with no
> >> >> >> > > responses.
> >> >> >> > > Now with your report I'm beginning to think it's a real bug.
>
> >> >> >> > > Anyone at Google care to toss in an opinion?
>
> >> >> >> > > On Jan 6, 7:25 am, rsung <[email protected]> wrote:
>
> >> >> >> > > > Anyone??? Is this a known bug?
>
> >> >> >> > > > On Dec 21 2008, 11:00 pm, PKC <[email protected]> wrote:
>
> >> >> >> > > > > I'm trying to make a simple set of animationsrepeat. Based
> >> >> >> > > > > on
> >> >> >> > > > > documentation, it appears that below should work but the
> >> >> >> > > > > animation
> >> >> >> > > > > runs once and does notrepeat. Any pointers would be
> >> >> >> > > > > appreciated.
>
> >> >> >> > > > > Thanks
>
> >> >> >> > > > > public void onCreate(Bundle savedInstanceState) {
> >> >> >> > > > > super.onCreate(savedInstanceState);
> >> >> >> > > > > setContentView(R.layout.main);
>
> >> >> >> > > > > TextView animWindow =
> >> >> >> > > > > (TextView)findViewById(R.id.anim_text);
>
> >> >> >> > > > > AnimationSetrootSet = newAnimationSet(true);
> >> >> >> > > > > rootSet.setInterpolator(new
> >> >> >> > > > > AccelerateInterpolator());
>
> >> >> >> > > > > // Create and add first child, a motion animation.
> >> >> >> > > > > TranslateAnimation trans1 = new
> >> >> >> > > > > TranslateAnimation(0, 30, 0,
> >> >> >> > > > > 0);
> >> >> >> > > > > trans1.setStartOffset(0);
> >> >> >> > > > > trans1.setDuration(800);
> >> >> >> > > > > trans1.setFillAfter(true);
> >> >> >> > > > > rootSet.addAnimation(trans1);
>
> >> >> >> > > > > // Add a final motion animation to the root set.
> >> >> >> > > > > TranslateAnimation trans2 = new
> >> >> >> > > > > TranslateAnimation(0, 0, 0,
> >> >> >> > > > > 100);
> >> >> >> > > > > trans2.setFillAfter(true);
> >> >> >> > > > > trans2.setDuration(800);
> >> >> >> > > > > trans2.setStartOffset(800);
> >> >> >> > > > > rootSet.addAnimation(trans2);
>
> >> >> >> > > > > rootSet.setRepeatCount(Animation.INFINITE);
> >> >> >> > > > > rootSet.setRepeatMode(Animation.RESTART);
>
> >> >> >> > > > > // Start the animation.
> >> >> >> > > > > animWindow.startAnimation(rootSet);
> >> >> >> > > > > }- Hide quoted text -
>
> >> >> >> > > > - Show quoted text -- Hide quoted text -
>
> >> >> >> > > - Show quoted text -- Hide quoted text -
>
> >> >> >> - Show quoted text -
>
> >> >> --
> >> >> 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- Hide quoted
> >> >> text -
>
> >> >> - Show quoted text -
>
> >> --
> >> 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
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---