AnimationUtil

import android.view.View;
import android.view.animation.AlphaAnimation;

public class AnimationUtil {
   public static void showAlphaAnimation(View v, long durationMillis) {
      AlphaAnimation animation = new AlphaAnimation(0, 1);
      animation.setDuration(durationMillis);
      v.startAnimation(animation);
   }

   public static void hideAlphaAnimation(View v, long durationMillis) {
      AlphaAnimation animation = new AlphaAnimation(1, 0);
      animation.setDuration(durationMillis);
      v.startAnimation(animation);
   }
}

 

posted on 2017-02-23 19:41  LoaderMan  阅读(131)  评论(0编辑  收藏  举报

导航