1

So I'm using the createNewLayerBuilder line and the new controller just pops up without an animation.

createNewLayerBuilder().setControllerType(ControllerName.class).build();

How do I add one?

Alex Gold
  • 105
  • 8

1 Answers1

1

It just requires a small addition: A duration for the animation, and use of setStackTransitionAnimators(StackTransitionAnimator... stackTransitionAnimators). For example:

createNewLayerBuilder().setControllerType(ControllerOfYourChoice.class).setDuration(400).setStackTransitionAnimators(createLayerTransition(PredefinedTransitions.Fade)).build();

Hope it helps!

Matan Koby
  • 232
  • 1
  • 11