美文网首页
ViewGroup添加删除View的动画--LayoutTran

ViewGroup添加删除View的动画--LayoutTran

作者: ProgZack | 来源:发表于2016-09-01 14:39 被阅读94次
    private void setupTransition(ViewGroup viewGroup){
        final LayoutTransition transition = new LayoutTransition();
        viewGroup.setLayoutTransition(transition);
        transition.setAnimator(LayoutTransition.APPEARING, transition.getAnimator(LayoutTransition.APPEARING));
        transition.setAnimator(LayoutTransition.DISAPPEARING, transition.getAnimator(LayoutTransition.DISAPPEARING));
        transition.setAnimator(LayoutTransition.CHANGE_APPEARING, transition.getAnimator(LayoutTransition.CHANGE_APPEARING));
        transition.setAnimator(LayoutTransition.CHANGE_DISAPPEARING, transition.getAnimator(LayoutTransition.CHANGE_DISAPPEARING));
    }
    

    相关文章

      网友评论

          本文标题:ViewGroup添加删除View的动画--LayoutTran

          本文链接:https://www.haomeiwen.com/subject/awncettx.html