MainActivity.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:JewelryUI 作者:
private void slideInUp(View view, Animation.AnimationListener animationListener) {
    AlphaAnimation fadeIn = new AlphaAnimation(0.0f, 1.0f);
    TranslateAnimation transIn = new TranslateAnimation(
            Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.0f);

    final AnimationSet animationSet = new AnimationSet(true);
    animationSet.addAnimation(fadeIn);
    animationSet.addAnimation(transIn);
    animationSet.setDuration(200);

    if (animationListener != null) {
        animationSet.setAnimationListener(animationListener);
    }

    view.setVisibility(View.VISIBLE);
    view.clearAnimation();
    view.startAnimation(animationSet);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号