Animation _aAnimation =AnimationUtils.loadAnimation(this,
             R.anim.push_left_in);
_aAnimation.setStartTime(1000);
 
_aAnimation.setDuration(1000);
  

currentrow.setAnimation(_aAnimation);
 
_aAnimation.start();
只开始执行一次 
以后就不好使了!???

解决方案 »

  1.   

    不是吧,你试试去掉
    _aAnimation.setStartTime(1000);
      
    _aAnimation.setDuration(1000);
       currentrow.setAnimation(_aAnimation);
    这三句 试试
      

  2.   

    人呢?? 有人知道  setAnimation这个函数怎么才能产生效果吗?
      

  3.   

    以后就不用再设置了吧,直接_aAnimation.start();就能执行了
      

  4.   

    _aAnimation.start();我已经启动了 还是没有效果啊 有的话 也就显示一次而已啊
      

  5.   

    http://www.ideasandroid.com/android/sdk/docs/reference/android/view/animation/Animation.html#setRepeatMode(int)
    设置重复次数,或者重复模式
    public void setRepeatCount (int repeatCount) 
    Since: API Level 1 Sets how many times the animation should be repeated. If the repeat count is 0, the animation is never repeated. If the repeat count is greater than 0 or INFINITE, the repeat mode will be taken into account. The repeat count is 0 by default.Related XML Attributes
    android:repeatCount 
    Parameters
    repeatCount  the number of times the animation should be repeated public void setRepeatMode (int repeatMode) 
    Since: API Level 1 Defines what this animation should do when it reaches the end. This setting is applied only when the repeat count is either greater than 0 or INFINITE. Defaults to RESTART. Related XML Attributes
    android:repeatMode 
    Parameters
    repeatMode  RESTART or REVERSE 
      

  6.   

    有人知道 怎么用  setAnimation??
      

  7.   

    放在onresume()方法里啊,不要放在oncreate()
      

  8.   

    启动Frame Animation动画的代码rocketAnimation.start();不能在OnCreate()中,因为在OnCreate()中AnimationDrawable还没有完全的与ImageView绑定,在OnCreate()中启动动画,就只能看到第一张图片