标签:nbsp void set tar util start rpo duration return
import android.view.View; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.LinearInterpolator; /*闪烁效果*/ public class AlphaAnimationUtil { /** * 开启View闪烁效果 * */ public static void startFlick(View view ){ if( null == view ){ return; } Animation alphaAnimation = new AlphaAnimation( 1.0f, 0.5f ); alphaAnimation.setDuration( 300 ); alphaAnimation.setFillBefore(true); alphaAnimation.setInterpolator( new LinearInterpolator( ) ); alphaAnimation.setRepeatCount( Animation.INFINITE ); alphaAnimation.setRepeatMode( Animation.REVERSE ); view.startAnimation( alphaAnimation ); } /** * 取消View闪烁效果 * */ public static void stopFlick( View view ){ if( null == view ){ return; } view.clearAnimation( ); } }
标签:nbsp void set tar util start rpo duration return
原文地址:https://www.cnblogs.com/tangchun/p/9328131.html