frameAnimation帧动画

   注意:outofmemory(7.8张图片)

   优化方法:把动态和静态部分分开,静态做背景,动态做动画

   使用步骤:

       1.美工做好单帧动画

       2.新建xml,新建resouse type为drawble,根元素为animation_list

   

    定义好图片和间隔时间

    android:oneshot="true" 单次循环



    
    
    
    
    
    
                   


       3.代码中得到:

ImageView p_w_picpathView = (ImageView) findViewById(R.id.p_w_picpathView1);
    final AnimationDrawable animationDrawable = (AnimationDrawable)     p_w_picpathView.getDrawable()

 

    播放动画.start();

   停止动画.stop();