lgvalle / Material-Animations

Android Transition animations explanation with examples.
MIT License
13.52k stars 2.47k forks source link

Explode as exit transition #41

Open bitvale opened 8 years ago

bitvale commented 8 years ago

Hi! In example You show explode transition as enter transition, but reverse transition is slide. How I can set explode transition as return or exit? When I call setExitTransition(explodeTransition) or setReturnTransition(explodeTransition) it not take any effect. I want explode as exit or return transition (up part slide up and down screen part slide down), reverse as enter.

Thank You!

lgvalle commented 8 years ago

What you may be missing is finishAfterTransition() Instead of finishing your Activity with the regular finish method, use the above to give the exit transition enough time to be displayed

bitvale commented 8 years ago

It does not help. I want reverse explode (up part slide up and down screen part slide down) but it slides. But if I set fade it's work.

lgvalle commented 8 years ago

If you don't set anything the framework should automatically reverse entry transition when activity exits

bitvale commented 8 years ago

Entry transition is explode, but why reverse is slide? In Your TransitionActivity2 enter transition is explode, exit and return transitions not defined and reverse is slide down. I setup explode for exit and return transition in TransitionActivity2 but it slide down. Please try by yourself.