'Do the initialization of incoming animation here.
Override to set your custom animation.'

def dismiss(self):

    def on_complete(*l):
        super(AnimatedPopup, self).dismiss()
        self.dispatch('on_deactivate')
    anim = Factory.Animation(opacity=0, d=0.25)
    anim.bind(on_complete=on_complete)
    anim.start(self)
