码迷,mamicode.com
首页 > 其他好文 > 详细

多个动画合并使用

时间:2015-08-18 18:53:46      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:

    /**
     * 动画集合:将多个动画放入集合后使用,动画累积
     * @return
     */
    private AnimationSet animationFactory() {
        
        //缩放动画
        ScaleAnimation sa = new ScaleAnimation(0.3f, 1.0f, 0.3f, 1.0f, Animation.RELATIVE_TO_SELF, 0,Animation.RELATIVE_TO_SELF, 0.5f);
        
        sa.setDuration(300);
        
        //透明度动画
        AlphaAnimation aa = new AlphaAnimation(0.5f, 1.0f);
        
        aa.setDuration(300);
        
        // 动画集合
        AnimationSet animationSet = new AnimationSet(false);
        
        animationSet.addAnimation(sa);
        
        animationSet.addAnimation(aa);
        
        return animationSet;
    }

 

多个动画合并使用

标签:

原文地址:http://www.cnblogs.com/cbooy/p/4740055.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!