2

I added this option to my FlexboxLayout for had animation when children move :

android:animateLayoutChanges="true"

Unfortunately child view are animated only when I add child, but not when one child is resized! Have you got any idea to always have an animation?

enter image description here

fingerup
  • 4,828
  • 2
  • 16
  • 22

1 Answers1

3

To animate children when they change their size you need to enable CHANGING transition type of the container's layoutTransition:

LayoutTransition layoutTransition = new LayoutTransition();
layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
parentView.setLayoutTransition(layoutTransition);

LayoutTransition

Wysel
  • 136
  • 1
  • 4