added snippet for not breaking when back is pressed

Added snippet for not breaking when back is pressed while animation runs, added event listener for animation end