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

2016-09-01  本文已影响94人  ProgZack
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));
}
上一篇下一篇

猜你喜欢

热点阅读