Code example for AlphaAnimation

Methods: setDurationsetFillAftersetInterpolator

0
			// µÚÒ»¸ö²ÎÊýfromAlphaΪ ¶¯»­¿ªÊ¼Ê±ºò͸Ã÷¶È  
            // µÚ¶þ¸ö²ÎÊýtoAlphaΪ ¶¯»­½áÊøʱºò͸Ã÷¶È  
            // 0.0±íʾÍêȫ͸Ã÷  
            // 1.0±íʾÍêÈ«²»Í¸Ã÷  
        	 
            alphaAnimation=new AlphaAnimation(1.0f, 0.0f); 
            //ÉèÖÃʱ¼ä 
        	alphaAnimation.setInterpolator(new AccelerateInterpolator());            
            //alphaAnimation.setFillAfter(false); 
            alphaAnimation.setFillAfter(true);
            alphaAnimation.setDuration(1000); 
            animationSet.addAnimation(alphaAnimation);//½«AlphaAnimation¶ÔÏóÌí¼Óµ½AnimationSetµ±ÖÐ
             
            mImageView1.startAnimation(animationSet);
        }	      
        //return true ; 
		return super.onTouchEvent(event);
	} 
} 
Experience pair programming with AI  Get Codota for Java