zoukankan      html  css  js  c++  java
  • 图片动画播放

    图片动画播放:

    import android.view.animation.Animation;
    import android.view.animation.AnimationSet;
    //import android.view.animation.RotateAnimation; 
    import android.view.animation.ScaleAnimation;

     AnimationSet animationSet = new AnimationSet(true); 
         if(mAnimationSet!=null && mAnimationSet != animationSet){
          ScaleAnimation scaleAnimation = new ScaleAnimation(2,0.5f,2,0.5f,
            Animation.RELATIVE_TO_PARENT,0.5f,   //使用动画播放图片       
            Animation.RELATIVE_TO_PARENT,0.5f); 
                    scaleAnimation.setDuration(1000);                     
                                       mAnimationSet.addAnimation(scaleAnimation); 
                                       mAnimationSet.setFillAfter(false); //让其保持动画结束时的状态。                        v.startAnimation(mAnimationSet);                    }                    ScaleAnimation scaleAnimation = new ScaleAnimation(1,2f,1,2f,                            Animation.RELATIVE_TO_SELF,0.5f,                             Animation.RELATIVE_TO_SELF,0.5f);                    scaleAnimation.setDuration(3000);                    animationSet.addAnimation(scaleAnimation);                    animationSet.setFillAfter(true);                     v.startAnimation(animationSet);                    mAnimationSet = animationSet;
           
         }
          ScaleAnimation scaleAnimation = new ScaleAnimation(1,2f,1,2f,   
                             Animation.RELATIVE_TO_SELF,0.5f,  
                                Animation.RELATIVE_TO_SELF,0.5f);  
                       scaleAnimation.setDuration(3000);   
                      animationSet.addAnimation(scaleAnimation); 
                        animationSet.setFillAfter(true);                  
                         v.startAnimation(animationSet);   
                   
                        mAnimationSet = animationSet; 

  • 相关阅读:
    浅谈《倒退的历史——某MIS项目手记(1):“切五花肉”式的分工 》
    使用SMO备份SQLServer2005数据库
    在.NET 2.0中,让你的组件也可以绑定
    URL 正则表达式,全【转】
    WinForm 自定义控件属性
    C# WebBrowser 中删除 HtmlElement
    C# C# WinForm控件美化扩展系列之ImageComboBox
    C# 处理无边框窗体
    【唠叨两句】Event and delegate
    与 “关闭窗体” 相关的一些零散知识
  • 原文地址:https://www.cnblogs.com/realhope/p/4270145.html
Copyright © 2011-2022 走看看