2013-05-15 49 views
1

我想在第一個動畫結束後開始第二個動畫。如何在android中一段時間​​後開始動畫?

這是我迄今爲止

<set xmlns:android="http://schemas.android.com/apk/res/android" 
    android:interpolator="@android:anim/linear_interpolator"> 
    <translate 
     android:toYDelta="50%p" 
     android:duration="6000" 
     android:fillEnabled="false" 
     android:startOffset="7000" 
     android:fillAfter="false"/>  
</set> 

任何幫助將appriciated完成。 TIA

+0

你可以編程的方式使用playSequentially()使用動畫設置 – vinoth

回答

1

對第一個動畫使用AnimationListener,當它完成時,開始第二個動畫。

animation1.setAnimationListener(new Animation.AnimationListener() { 
      @Override 
      public void onAnimationStart(Animation animation) { 

      } 

      @Override 
      public void onAnimationEnd(Animation animation) { 
       // Start the second animation. 
      } 

      @Override 
      public void onAnimationRepeat(Animation animation) { 

      } 
     }); 
+0

我想我告訴同樣的想法:) – Sameer

相關問題