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; 

  • 相关阅读:
    .NETCORE CONSUL
    Jenkins+github自动化部署.Net Core程序到Docker
    CleanArchitecture原则CQRS模式
    BFF架构了解
    .NET 生态系统的蜕变之 .NET 6
    Deislabs开源 使用WebAssembly打造的PaaS项目Hippo
    微软认真聆听了开源 .NET 开发社区的炮轰: 通过CLI 支持 Hot Reload 功能
    单体应用 适合采用 dapr 构建吗?
    微软发布了Visual Studio 2022 RC版,并将在11月8日发布正式版
    [LeetCode] 1248. Count Number of Nice Subarrays 统计优美子数组
  • 原文地址:https://www.cnblogs.com/realhope/p/4270145.html
Copyright © 2011-2022 走看看