Animations Question

Posts: 27
I've got my overlay how I want, but want to do some slides essentially to make things move around a bit when coming in. For example, I have a top 10 board that shows the top 10 obviously, and I have it on a button that displays the widget on a toggle, and an animation set to slide it in from the left. How do I get it to slide back? I have created a new animation for it, and even set up a button, but it automatically hides it when I click the button. Is there a way to leave it on toggle, but have it do an animation when its shown, and another animation when its hidden?
Posts: 785
You should not use a toggle show/hide if you want to use an animation to hide it. The "slide off" animation should finish playing first, and then you should hide it. This flow can be achieved most easily with a Storyboard where you can define multiple actions that should happen sequentially with a predefined timing.

In your example it would probably be these actions:

Show storyboard:
- Show Widget
- Start "slide in" animation

Hide storyboard:
- Start "slide out" animation"
- Hide Widget

The storyboard should pick up on the duration of the animation and automatically set the start time of the second action so it hides only after the animation finished. You can change the timing if desired.

Most likely you will then use two buttons: one to start "Show storyboard" and one to start "Hide storyboard".
Posts: 27
This worked perfect. Thank you so much!