/**
     * 动画集合:将多个动画放入集合后使用,动画累积
     * @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;
    }

 

posted on 2015-08-18 17:29  cbooy  阅读(293)  评论(0编辑  收藏  举报